]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: set stateid access and deny bits in nfs4_get_vfs_file
authorJeff Layton <jlayton@primarydata.com>
Thu, 10 Jul 2014 18:07:31 +0000 (14:07 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 11 Jul 2014 15:06:05 +0000 (11:06 -0400)
commitb7c311456dc697bcf6e5f6fd2d936d64755d39b1
tree35ce555fc466e8e206ba2d104fdc160a71fdd989
parentc365b294e01edc5f2405d43eaf24897bb24b130c
nfsd: set stateid access and deny bits in nfs4_get_vfs_file

Cleanup -- ensure that the stateid bits are set at the same time that
the file access refcounts are incremented. Keeping them coherent like
this makes it easier to ensure that we account for all of the
references.

Since the initialization of the st_*_bmap fields is done when it's
hashed, we go ahead and hash the stateid before getting access to the
file and unhash it if that function returns error. This will be
necessary anyway in a follow-on patch that will overhaul deny mode
handling.

Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c