]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd4: fix openmode checking on IO using lock stateid
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 29 Jul 2010 19:16:59 +0000 (15:16 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 29 Jul 2010 20:37:12 +0000 (16:37 -0400)
commitee7f7970f982f1930a8aa8bbe1cd8e309968be43
tree623710431d4416022594d1a2a473f3ca64bf7490
parent0df717582a948d43ae5675f47f1a1803573e2c90
nfsd4: fix openmode checking on IO using lock stateid

It is legal to perform a write using the lock stateid that was
originally associated with a read lock, or with a file that was
originally opened for read, but has since been upgraded.

So, when checking the openmode, check the mode associated with the
open stateid from which the lock was derived.

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