From 0032a7a749a49b2c044092a1d0af5cfd0077f35d Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Thu, 8 Mar 2012 17:16:12 -0500 Subject: NFS: Don't copy read delegation stateids in setattr The server will just return an NFS4ERR_OPENMODE anyway. Signed-off-by: Trond Myklebust --- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/nfs/nfs4proc.c') diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index a8dd04db764..3578ad36a5b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -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); -- cgit v1.2.3-70-g09d2