From b5ce645aba5b929d1db5f79e3a38463bb465feb5 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sun, 30 Jul 2006 03:03:16 -0700 Subject: [PATCH] --- yaml --- r: 32919 b: refs/heads/master c: d1bbf14f37261c2c0dba71404602e1ddcec069d2 h: refs/heads/master i: 32917: fb6828e51b62f9158c47d36a0f6ba6b857cf61e9 32915: 7fed56645e11274b718c1065b14835a091d7d94d 32911: e7f28834c1f8a48e651dbf375ca44124fd73d436 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfsfh.c | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index f6d739ddaae5..8169a6c64336 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a5ca63cb60892c1703998daf80d2d1b04cb70103 +refs/heads/master: d1bbf14f37261c2c0dba71404602e1ddcec069d2 diff --git a/trunk/fs/nfsd/nfsfh.c b/trunk/fs/nfsd/nfsfh.c index ecc439d2565f..501d83884530 100644 --- a/trunk/fs/nfsd/nfsfh.c +++ b/trunk/fs/nfsd/nfsfh.c @@ -187,6 +187,11 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) goto out; } + /* Set user creds for this exportpoint */ + error = nfserrno(nfsd_setuser(rqstp, exp)); + if (error) + goto out; + /* * Look up the dentry using the NFS file handle. */ @@ -241,16 +246,17 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) dprintk("nfsd: fh_verify - just checking\n"); dentry = fhp->fh_dentry; exp = fhp->fh_export; + /* Set user creds for this exportpoint; necessary even + * in the "just checking" case because this may be a + * filehandle that was created by fh_compose, and that + * is about to be used in another nfsv4 compound + * operation */ + error = nfserrno(nfsd_setuser(rqstp, exp)); + if (error) + goto out; } cache_get(&exp->h); - /* Set user creds for this exportpoint; necessary even in the "just - * checking" case because this may be a filehandle that was created by - * fh_compose, and that is about to be used in another nfsv4 compound - * operation */ - error = nfserrno(nfsd_setuser(rqstp, exp)); - if (error) - goto out; error = nfsd_mode_check(rqstp, dentry->d_inode->i_mode, type); if (error)