aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/delegation.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r--fs/nfs/delegation.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 12de88353eeb..89af1d269274 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
256 /* 256 /*
257 * Deal with broken servers that hand out two 257 * Deal with broken servers that hand out two
258 * delegations for the same file. 258 * delegations for the same file.
259 * Allow for upgrades to a WRITE delegation, but
260 * nothing else.
259 */ 261 */
260 dfprintk(FILE, "%s: server %s handed out " 262 dfprintk(FILE, "%s: server %s handed out "
261 "a duplicate delegation!\n", 263 "a duplicate delegation!\n",
262 __func__, clp->cl_hostname); 264 __func__, clp->cl_hostname);
263 if (delegation->type <= old_delegation->type) { 265 if (delegation->type == old_delegation->type ||
266 !(delegation->type & FMODE_WRITE)) {
264 freeme = delegation; 267 freeme = delegation;
265 delegation = NULL; 268 delegation = NULL;
266 goto out; 269 goto out;