From: NeilBrown nfsd_setuser was not called until after filehandle lookup was done, so filehandle lookup would use the wrong userid, and so the permission checking in nfsd_acceptable would be bogus. --- 25-akpm/fs/nfsd/nfsfh.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -puN fs/nfsd/nfsfh.c~nfsd-01-stale-filehandles-fixes fs/nfsd/nfsfh.c --- 25/fs/nfsd/nfsfh.c~nfsd-01-stale-filehandles-fixes Thu Jan 15 17:41:18 2004 +++ 25-akpm/fs/nfsd/nfsfh.c Thu Jan 15 17:42:51 2004 @@ -164,6 +164,9 @@ fh_verify(struct svc_rqst *rqstp, struct goto out; } + /* Set user creds for this exportpoint */ + nfsd_setuser(rqstp, exp); + /* * Look up the dentry using the NFS file handle. */ @@ -224,9 +227,6 @@ fh_verify(struct svc_rqst *rqstp, struct inode = dentry->d_inode; - /* Set user creds for this exportpoint */ - nfsd_setuser(rqstp, exp); - /* Type check. The correct error return for type mismatches * does not seem to be generally agreed upon. SunOS seems to * use EISDIR if file isn't S_IFREG; a comment in the NFSv3 _