source: server/common/patches/openafs-enoent.patch @ 848

Last change on this file since 848 was 848, checked in by andersk, 14 years ago
Unrevert STABLE14-linux-fakestat-avoid-mtpt-fillin-issue-20080415 and add /afs/andrew.cmu.edu/usr/shadow/scripts-enoent-2.diff to fix the ENOENT bug. [r846 was actually the ENOTDIR bug.]
File size: 1.8 KB
  • src/afs/LINUX/osi_vnodeops.c

    RCS file: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v
    retrieving revision 1.81.2.68
    diff -u -r1.81.2.68 osi_vnodeops.c
     
    789789    cred_t *credp = NULL;
    790790    struct vcache *vcp, *pvcp, *tvc = NULL;
    791791    int valid;
     792    struct afs_fakestat_state fakestate;
    792793
    793794#ifdef AFS_LINUX24_ENV
    794795    lock_kernel();
    795796#endif
    796797    AFS_GLOCK();
     798    afs_InitFakeStat(&fakestate);
    797799
    798800    if (dp->d_inode) {
    799801
     
    805807
    806808        if (vcp->mvstat == 1) {         /* mount point */
    807809            if (vcp->mvid && (vcp->states & CMValid)) {
    808                 /* a mount point, not yet replaced by its directory */
    809                 goto bad_dentry;
     810                int tryEvalOnly = 0;
     811                int code = 0;
     812                struct vrequest treq;
     813
     814                credp = crref();
     815                code = afs_InitReq(&treq, credp);
     816                if (
     817#ifdef AFS_DARWIN_ENV
     818                    (strcmp(dp->d_name.name, ".DS_Store") == 0) ||
     819                    (strcmp(dp->d_name.name, "Contents") == 0) ||
     820#endif
     821                    (strcmp(dp->d_name.name, ".directory") == 0)) {
     822                    tryEvalOnly = 1;
     823                }
     824                if (tryEvalOnly)
     825                    code = afs_TryEvalFakeStat(&vcp, &fakestate, &treq);
     826                else
     827                    code = afs_EvalFakeStat(&vcp, &fakestate, &treq);
     828                if ((tryEvalOnly && vcp->mvstat == 1) || code) {
     829                    /* a mount point, not yet replaced by its directory */
     830                    goto bad_dentry;
     831                }
    810832            }
    811833        } else
    812834            if (*dp->d_name.name != '/' && vcp->mvstat == 2) /* root vnode */
     
    870892    /* Clean up */
    871893    if (tvc)
    872894        afs_PutVCache(tvc);
     895    afs_PutFakeStat(&fakestate);
    873896    AFS_GUNLOCK();
    874897    if (credp)
    875898        crfree(credp);
     
    884907    return valid;
    885908
    886909  bad_dentry:
    887     valid = 0;
     910    if (have_submounts(dp))
     911        valid = 1;
     912    else
     913        valid = 0;
    888914    goto done;
    889915}
    890916
Note: See TracBrowser for help on using the repository browser.