diff options
Diffstat (limited to 'fs/nfs/delegation.c')
| -rw-r--r-- | fs/nfs/delegation.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 12de88353ee..89af1d26927 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -256,11 +256,14 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct  		/*  		 * Deal with broken servers that hand out two  		 * delegations for the same file. +		 * Allow for upgrades to a WRITE delegation, but +		 * nothing else.  		 */  		dfprintk(FILE, "%s: server %s handed out "  				"a duplicate delegation!\n",  				__func__, clp->cl_hostname); -		if (delegation->type <= old_delegation->type) { +		if (delegation->type == old_delegation->type || +		    !(delegation->type & FMODE_WRITE)) {  			freeme = delegation;  			delegation = NULL;  			goto out;  |