summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfscache.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2013-01-28 20:41:08 +0100
committerJ. Bruce Fields <bfields@redhat.com>2013-02-04 15:16:19 +0100
commit6dc8889589678c228a675b9f01721318a31a8f5b (patch)
tree3cbfbef12dec62f99826c7f32a84fb6a86b8f4cf /fs/nfsd/nfscache.c
parentnfsd: fix IPv6 address handling in the DRC (diff)
downloadlinux-6dc8889589678c228a675b9f01721318a31a8f5b.tar.xz
linux-6dc8889589678c228a675b9f01721318a31a8f5b.zip
nfsd: remove unneeded spinlock in nfsd_cache_update
The locking rules for cache entries say that locking the cache_lock isn't needed if you're just touching the current entry. Earlier in this function we set rp->c_state to RC_UNUSED without any locking, so I believe it's ok to do the same here. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfscache.c')
-rw-r--r--fs/nfsd/nfscache.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c
index 5dd9ec2a177f..972c14a033ee 100644
--- a/fs/nfsd/nfscache.c
+++ b/fs/nfsd/nfscache.c
@@ -286,9 +286,7 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp)
cachv = &rp->c_replvec;
cachv->iov_base = kmalloc(len << 2, GFP_KERNEL);
if (!cachv->iov_base) {
- spin_lock(&cache_lock);
rp->c_state = RC_UNUSED;
- spin_unlock(&cache_lock);
return;
}
cachv->iov_len = len << 2;