NFS: Don't copy read delegation stateids in setattr

The server will just return an NFS4ERR_OPENMODE anyway.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust
2012-03-08 17:16:12 -05:00
parent 2dc317565b
commit 0032a7a749
3 changed files with 12 additions and 8 deletions

View File

@@ -1929,7 +1929,7 @@ static int _nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
nfs_fattr_init(fattr);
if (nfs4_copy_delegation_stateid(&arg.stateid, inode)) {
if (nfs4_copy_delegation_stateid(&arg.stateid, inode, FMODE_WRITE)) {
/* Use that stateid */
} else if (state != NULL) {
nfs4_select_rw_stateid(&arg.stateid, state, current->files, current->tgid);