summaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
authorTrond Myklebust2014-06-30 17:48:31 +0200
committerJ. Bruce Fields2014-07-08 23:14:30 +0200
commit950e0118d06fae26e07b283b83e96124a2075a1d (patch)
tree27ac2db5bb9fadc77f1a9d87f67e983cf1f295aa /fs/compat.c
parentnfsd: fix file access refcount leak when nfsd4_truncate fails (diff)
downloadkernel-qcow2-linux-950e0118d06fae26e07b283b83e96124a2075a1d.tar.gz
kernel-qcow2-linux-950e0118d06fae26e07b283b83e96124a2075a1d.tar.xz
kernel-qcow2-linux-950e0118d06fae26e07b283b83e96124a2075a1d.zip
nfsd: Protect addition to the file_hashtbl
Current code depends on the client_mutex to guarantee a single struct nfs4_file per inode in the file_hashtbl and make addition atomic with respect to lookup. Rely instead on the state_Lock, to make it easier to stop taking the client_mutex here later. To prevent an i_lock/state_lock inversion, change nfsd4_init_file to use ihold instead if igrab. That's also more efficient anyway as we definitely hold a reference to the inode at that point. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Jeff Layton <jlayton@primarydata.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/compat.c')
0 files changed, 0 insertions, 0 deletions