diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 611052bacaff..f57dba815099 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #define NFS4_POLL_RETRY_MIN (1*HZ) | 56 | #define NFS4_POLL_RETRY_MIN (1*HZ) |
57 | #define NFS4_POLL_RETRY_MAX (15*HZ) | 57 | #define NFS4_POLL_RETRY_MAX (15*HZ) |
58 | 58 | ||
59 | static int _nfs4_proc_open_confirm(struct rpc_clnt *clnt, const struct nfs_fh *fh, struct nfs4_state_owner *sp, nfs4_stateid *stateid, struct nfs_seqid *seqid); | ||
59 | static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *); | 60 | static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *); |
60 | static int nfs4_async_handle_error(struct rpc_task *, struct nfs_server *); | 61 | static int nfs4_async_handle_error(struct rpc_task *, struct nfs_server *); |
61 | static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry); | 62 | static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry); |
@@ -333,11 +334,21 @@ static int _nfs4_open_delegation_recall(struct dentry *dentry, struct nfs4_state | |||
333 | memcpy(arg.u.delegation.data, state->stateid.data, sizeof(arg.u.delegation.data)); | 334 | memcpy(arg.u.delegation.data, state->stateid.data, sizeof(arg.u.delegation.data)); |
334 | status = rpc_call_sync(server->client, &msg, RPC_TASK_NOINTR); | 335 | status = rpc_call_sync(server->client, &msg, RPC_TASK_NOINTR); |
335 | nfs_increment_open_seqid(status, arg.seqid); | 336 | nfs_increment_open_seqid(status, arg.seqid); |
337 | if (status != 0) | ||
338 | goto out_free; | ||
339 | if(res.rflags & NFS4_OPEN_RESULT_CONFIRM) { | ||
340 | status = _nfs4_proc_open_confirm(server->client, NFS_FH(inode), | ||
341 | sp, &res.stateid, arg.seqid); | ||
342 | if (status != 0) | ||
343 | goto out_free; | ||
344 | } | ||
345 | nfs_confirm_seqid(&sp->so_seqid, 0); | ||
336 | if (status >= 0) { | 346 | if (status >= 0) { |
337 | memcpy(state->stateid.data, res.stateid.data, | 347 | memcpy(state->stateid.data, res.stateid.data, |
338 | sizeof(state->stateid.data)); | 348 | sizeof(state->stateid.data)); |
339 | clear_bit(NFS_DELEGATED_STATE, &state->flags); | 349 | clear_bit(NFS_DELEGATED_STATE, &state->flags); |
340 | } | 350 | } |
351 | out_free: | ||
341 | nfs_free_seqid(arg.seqid); | 352 | nfs_free_seqid(arg.seqid); |
342 | out: | 353 | out: |
343 | dput(parent); | 354 | dput(parent); |
@@ -366,7 +377,7 @@ int nfs4_open_delegation_recall(struct dentry *dentry, struct nfs4_state *state) | |||
366 | return err; | 377 | return err; |
367 | } | 378 | } |
368 | 379 | ||
369 | static inline int _nfs4_proc_open_confirm(struct rpc_clnt *clnt, const struct nfs_fh *fh, struct nfs4_state_owner *sp, nfs4_stateid *stateid, struct nfs_seqid *seqid) | 380 | static int _nfs4_proc_open_confirm(struct rpc_clnt *clnt, const struct nfs_fh *fh, struct nfs4_state_owner *sp, nfs4_stateid *stateid, struct nfs_seqid *seqid) |
370 | { | 381 | { |
371 | struct nfs_open_confirmargs arg = { | 382 | struct nfs_open_confirmargs arg = { |
372 | .fh = fh, | 383 | .fh = fh, |