]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: ensure that st_access_bmap and st_deny_bmap are initialized to 0
authorJeff Layton <jlayton@primarydata.com>
Wed, 23 Jul 2014 17:46:49 +0000 (13:46 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 23 Jul 2014 18:20:47 +0000 (14:20 -0400)
commita28c5683d634e114c7afe9ab02c35fd6083513e4
tree7932c333d008c0cd91d5e38cb8954b2bfbda461d
parentfd20e004da5963a650c8a3035a66cad65f1c2897
nfsd: ensure that st_access_bmap and st_deny_bmap are initialized to 0

Open stateids must be initialized with the st_access_bmap and
st_deny_bmap set to 0, so that nfs4_get_vfs_file can properly record
their state in old_access_bmap and old_deny_bmap.

This bug was introduced in commit 614477278411 (nfsd: make deny mode
enforcement more efficient and close races in it) and was causing the
refcounts to end up incorrect when nfs4_get_vfs_file returned an error
after bumping the refcounts. This made it impossible to unmount the
underlying filesystem after running pynfs tests that involve deny modes.

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