diff options
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r-- | fs/nfs/delegation.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 2714ef835bdd..be806ead7f4d 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -113,7 +113,8 @@ out: | |||
113 | return status; | 113 | return status; |
114 | } | 114 | } |
115 | 115 | ||
116 | static int nfs_delegation_claim_opens(struct inode *inode, const nfs4_stateid *stateid) | 116 | static int nfs_delegation_claim_opens(struct inode *inode, |
117 | const nfs4_stateid *stateid, fmode_t type) | ||
117 | { | 118 | { |
118 | struct nfs_inode *nfsi = NFS_I(inode); | 119 | struct nfs_inode *nfsi = NFS_I(inode); |
119 | struct nfs_open_context *ctx; | 120 | struct nfs_open_context *ctx; |
@@ -140,7 +141,7 @@ again: | |||
140 | /* Block nfs4_proc_unlck */ | 141 | /* Block nfs4_proc_unlck */ |
141 | mutex_lock(&sp->so_delegreturn_mutex); | 142 | mutex_lock(&sp->so_delegreturn_mutex); |
142 | seq = raw_seqcount_begin(&sp->so_reclaim_seqcount); | 143 | seq = raw_seqcount_begin(&sp->so_reclaim_seqcount); |
143 | err = nfs4_open_delegation_recall(ctx, state, stateid); | 144 | err = nfs4_open_delegation_recall(ctx, state, stateid, type); |
144 | if (!err) | 145 | if (!err) |
145 | err = nfs_delegation_claim_locks(ctx, state, stateid); | 146 | err = nfs_delegation_claim_locks(ctx, state, stateid); |
146 | if (!err && read_seqcount_retry(&sp->so_reclaim_seqcount, seq)) | 147 | if (!err && read_seqcount_retry(&sp->so_reclaim_seqcount, seq)) |
@@ -411,7 +412,8 @@ static int nfs_end_delegation_return(struct inode *inode, struct nfs_delegation | |||
411 | do { | 412 | do { |
412 | if (test_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) | 413 | if (test_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) |
413 | break; | 414 | break; |
414 | err = nfs_delegation_claim_opens(inode, &delegation->stateid); | 415 | err = nfs_delegation_claim_opens(inode, &delegation->stateid, |
416 | delegation->type); | ||
415 | if (!issync || err != -EAGAIN) | 417 | if (!issync || err != -EAGAIN) |
416 | break; | 418 | break; |
417 | /* | 419 | /* |