From fc63aa94a95a910746089ef8770035fedd53db21 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Mon, 27 Jun 2011 16:57:12 -0400 Subject: [PATCH] --- yaml --- r: 259050 b: refs/heads/master c: 499f3edc23ca0431f3a0a6736b3a40944c81bf3b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4state.c | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 83305c8d02eb..559d9cadb278 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 17456804546b78a1c13d2b934c8f50bbde141a38 +refs/heads/master: 499f3edc23ca0431f3a0a6736b3a40944c81bf3b diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index 12244cee1680..5e8806a9ef4e 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/fs/nfsd/nfs4state.c @@ -385,14 +385,6 @@ static int nfs4_access_to_omode(u32 access) BUG(); } -static int nfs4_access_bmap_to_omode(struct nfs4_stateid *stp) -{ - unsigned int access; - - set_access(&access, stp->st_access_bmap); - return nfs4_access_to_omode(access); -} - static void unhash_generic_stateid(struct nfs4_stateid *stp) { list_del(&stp->st_hash); @@ -402,11 +394,14 @@ static void unhash_generic_stateid(struct nfs4_stateid *stp) static void free_generic_stateid(struct nfs4_stateid *stp) { - int oflag; + int i; if (stp->st_access_bmap) { - oflag = nfs4_access_bmap_to_omode(stp); - nfs4_file_put_access(stp->st_file, oflag); + for (i = 1; i < 4; i++) { + if (test_bit(i, &stp->st_access_bmap)) + nfs4_file_put_access(stp->st_file, + nfs4_access_to_omode(i)); + } } put_nfs4_file(stp->st_file); kmem_cache_free(stateid_slab, stp);