]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
NFSv4: Fix problem with OPEN_DOWNGRADE
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 4 Nov 2005 20:33:38 +0000 (15:33 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 4 Nov 2005 20:33:38 +0000 (15:33 -0500)
commitd530838bfa507d67b40d13b00d9cbd7a46a47e78
treef4b2be26c0a7b9ed3233a2be016b7e97427f8705
parent4cecb76ff86db46d2823550256c828b6597f418e
NFSv4: Fix problem with OPEN_DOWNGRADE

 RFC 3530 states that for OPEN_DOWNGRADE "The share_access and share_deny
 bits specified must be exactly equal to the union of the share_access and
 share_deny bits specified for some subset of the OPENs in effect for
 current openowner on the current file.

 Setattr is currently violating the NFSv4 rules for OPEN_DOWNGRADE in that
 it may cause a downgrade from OPEN4_SHARE_ACCESS_BOTH to
 OPEN4_SHARE_ACCESS_WRITE despite the fact that there exists no open file
 with O_WRONLY access mode.

 Fix the problem by replacing nfs4_find_state() with a modified version of
 nfs_find_open_context().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/inode.c
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c
fs/nfs/read.c
fs/nfs/write.c
include/linux/nfs_fs.h