aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c13
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
59static 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);
59static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *); 60static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *);
60static int nfs4_async_handle_error(struct rpc_task *, struct nfs_server *); 61static int nfs4_async_handle_error(struct rpc_task *, struct nfs_server *);
61static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry); 62static 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 }
351out_free:
341 nfs_free_seqid(arg.seqid); 352 nfs_free_seqid(arg.seqid);
342out: 353out:
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
369static 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) 380static 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,