]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd4: fix downgrade/lock logic
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 20 Aug 2010 22:09:31 +0000 (18:09 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 26 Aug 2010 17:22:02 +0000 (13:22 -0400)
commit409005c03e28b6cab5fba59eba52772e84883b31
treeda2bc54b7d2527b465833610d80ec0285b90c8a7
parent412652dc8bcb5f8a7860c87b661cc99ec97ce566
nfsd4: fix downgrade/lock logic

If we already had a RW open for a file, and get a readonly open, we were
piggybacking on the existing RW open.  That's inconsistent with the
downgrade logic which blows away the RW open assuming you'll still have
a readonly open.

Also, make sure there is a readonly or writeonly open available for
locking, again to prevent bad behavior in downgrade cases when any RW
open may be lost.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c
fs/nfsd/state.h