From 6e880ed20e91ce1f83f8493b56947ef1d13dbf0f Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Fri, 13 Feb 2004 18:58:39 +0000 Subject: [PATCH] revert-linux-sysname-list-estale-fix-20040213 (despite just committing a leak fix) we can no longer find a kernel where this is needed so we'll leave it in the cvs history but revoke it. it may have been a "special" kernel --- src/afs/LINUX/osi_vnodeops.c | 47 +----------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 7cb1db04a9..d30c6e3b52 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -1072,8 +1072,6 @@ afs_linux_create(struct inode *dip, struct dentry *dp, int mode) return -code; } -#define AFS_EQ_ATSYS(name) (((name)[0]=='@')&&((name)[1]=='s')&&((name)[2]=='y')&&((name)[3]=='s')&&(!(name)[4])) - /* afs_linux_lookup */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,10) struct dentry * @@ -1087,29 +1085,8 @@ afs_linux_lookup(struct inode *dip, struct dentry *dp) cred_t *credp = crref(); struct vcache *vcp = NULL; const char *comp = dp->d_name.name; - char *name = NULL; - struct sysname_info sysState; - struct qstr qstr; - struct vrequest treq; - - sysState.allocked = 0; - AFS_GLOCK(); - - /* In order that we not get ESTALE on @sys links that resolve - into the 2nd or later item in an @sys list, resolve it ourselves - and force a lookup of the actual match here. The real directory - thus gets the dentry. */ - if (AFS_EQ_ATSYS(comp) && !afs_InitReq(&treq, credp)) { - Check_AtSys(ITOAFS(dip), comp, &sysState, &treq); - name = sysState.name; - - code = afs_lookup(ITOAFS(dip), name, &vcp, credp); - while (code == ENOENT && Next_AtSys(ITOAFS(dip), &treq, &sysState)) { - code = afs_lookup(ITOAFS(dip), name, &vcp, credp); - } - } else - code = afs_lookup(ITOAFS(dip), comp, &vcp, credp); + code = afs_lookup(ITOAFS(dip), comp, &vcp, credp); if (vcp) { struct inode *ip = AFSTOI(vcp); @@ -1141,28 +1118,6 @@ afs_linux_lookup(struct inode *dip, struct dentry *dp) dp->d_op = afs_dops; d_add(dp, AFSTOI(vcp)); - if (sysState.allocked) osi_FreeLargeSpace(sysState.name); -#if 0 - /* Set up a dentry alias. Should we be doing this for @sys? - You only get one for a directory, which would be fine, - @sys would only map to one at a time, but it's unclear - that this is consistent behavior. */ - if (AFS_EQ_ATSYS(comp) && sysState.allocked) { - int result; - struct dentry *dentry; - - qstr.name = name; - qstr.len = strlen(name); - qstr.hash = full_name_hash(name, qstr.len); - result = d_lookup(dp->d_parent, &qstr); - if (!result) { - dentry = d_alloc(dp->d_parent, &qstr); - if (dentry) - d_instantiate(dentry, AFSTOI(vcp)); - } - } -#endif - AFS_GUNLOCK(); crfree(credp);