NFS: Remove nfs4_wait_for_completion_rpc_task()
Subsystems (2)
PATCH 1/2 NFS: Remove nfs4_wait_for_completion_rpc_task()
From: Anna Schumaker <[email protected]>
Signed-off-by Anna Schumaker <[email protected]>
--- fs/nfs/nfs4proc.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-)
fs/nfs/nfs4proc.c +7 -15
@@ -1313,14 +1313,6 @@ static void nfs4_opendata_put(struct nfs4_opendata *p)kref_put (&p->kref, nfs4_opendata_free); } -static int nfs4_wait_for_completion_rpc_task (struct rpc_task *task) -{ -int ret; - - ret =rpc_wait_for_completion_task (task); -return ret; -} -static bool nfs4_mode_match_open_stateid (struct nfs4_state *state,fmode_t fmode) {
@@ -2107,7 +2099,7 @@ static int _nfs4_proc_open_confirm(struct nfs4_opendata *data) task =rpc_run_task (&task_setup_data);if (IS_ERR (task))return PTR_ERR (task); - status =nfs4_wait_for_completion_rpc_task (task); + status =rpc_wait_for_completion_task (task);if (status !=0 ) { data->cancelled =1 ;smp_wmb ();
@@ -2274,7 +2266,7 @@ static int nfs4_run_open_task(struct nfs4_opendata *data, int isrecover) task =rpc_run_task (&task_setup_data);if (IS_ERR (task))return PTR_ERR (task); - status =nfs4_wait_for_completion_rpc_task (task); + status =rpc_wait_for_completion_task (task);if (status !=0 ) { data->cancelled =1 ;smp_wmb ();
@@ -5791,7 +5783,7 @@ static int _nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, coreturn PTR_ERR (task);if (!issync) goto out; - status =nfs4_wait_for_completion_rpc_task (task); + status =rpc_wait_for_completion_task (task);if (status !=0 ) goto out; status = data->rpc_status;
@@ -6061,7 +6053,7 @@ static int nfs4_proc_unlck(struct nfs4_state *state, int cmd, struct file_lock * status =PTR_ERR (task);if (IS_ERR (task)) goto out; - status =nfs4_wait_for_completion_rpc_task (task); + status =rpc_wait_for_completion_task (task);rpc_put_task (task); out: request->fl_flags = fl_flags;
@@ -6290,7 +6282,7 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f task =rpc_run_task (&task_setup_data);if (IS_ERR (task))return PTR_ERR (task); - ret =nfs4_wait_for_completion_rpc_task (task); + ret =rpc_wait_for_completion_task (task);if (ret ==0 ) { ret = data->rpc_status;if (ret)
@@ -8358,7 +8350,7 @@ static int nfs41_proc_reclaim_complete(struct nfs_client *clp, status =PTR_ERR (task); goto out; } - status =nfs4_wait_for_completion_rpc_task (task); + status =rpc_wait_for_completion_task (task);if (status ==0 ) status = task->tk_status;rpc_put_task (task);
@@ -8590,7 +8582,7 @@ nfs4_proc_layoutget(struct nfs4_layoutget *lgp, long *timeout, gfp_t gfp_flags) task =rpc_run_task (&task_setup_data);if (IS_ERR (task))return ERR_CAST (task); - status =nfs4_wait_for_completion_rpc_task (task); + status =rpc_wait_for_completion_task (task);if (status ==0 ) { status =nfs4_layoutget_handle_exception (task, lgp, &exception); *timeout = exception.timeout;
Signature · 1 line
2.11.0
PATCH 2/2 NFS: Fix inconsistent indentation in nfs4proc.c
From: Anna Schumaker <[email protected]>
Signed-off-by Anna Schumaker <[email protected]>
--- fs/nfs/nfs4proc.c | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-)
fs/nfs/nfs4proc.c +28 -28
@@ -2264,15 +2264,15 @@ static int nfs4_run_open_task(struct nfs4_opendata *data, int isrecover) data->is_recover =1 ; } task =rpc_run_task (&task_setup_data); -if (IS_ERR (task)) -return PTR_ERR (task); - status =rpc_wait_for_completion_task (task); -if (status !=0 ) { - data->cancelled =1 ; -smp_wmb (); - }else - status = data->rpc_status; -rpc_put_task (task); +if (IS_ERR (task)) +return PTR_ERR (task); + status =rpc_wait_for_completion_task (task); +if (status !=0 ) { + data->cancelled =1 ; +smp_wmb (); + }else + status = data->rpc_status; +rpc_put_task (task);return status; }
@@ -2281,7 +2281,7 @@ static int _nfs4_recover_proc_open(struct nfs4_opendata *data) {struct inode *dir =d_inode (data->dir);struct nfs_openres *o_res = &data->o_res; -int status; +int status; status =nfs4_run_open_task (data,1 );if (status !=0 || !data->rpc_done)
@@ -2912,12 +2912,12 @@ static int _nfs4_do_setattr(struct inode *inode, struct nfs_open_context *ctx) {struct nfs_server *server =NFS_SERVER (inode); -struct rpc_message msg = { +struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETATTR ], .rpc_argp = arg, .rpc_resp = res, .rpc_cred = cred, - }; + };struct rpc_cred *delegation_cred =NULL ;unsigned long timestamp = jiffies;fmode_t fmode;
@@ -2965,18 +2965,18 @@ static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred, {struct nfs_server *server =NFS_SERVER (inode);struct nfs4_state *state = ctx ? ctx->state :NULL ; -struct nfs_setattrargs arg = { - .fh =NFS_FH (inode), - .iap = sattr, +struct nfs_setattrargs arg = { + .fh =NFS_FH (inode), + .iap = sattr, .server = server, .bitmask = server->attr_bitmask, .label = ilabel, - }; -struct nfs_setattrres res = { + }; +struct nfs_setattrres res = { .fattr = fattr, .label = olabel, .server = server, - }; + };struct nfs4_exception exception = { .state = state, .inode = inode,
@@ -3090,7 +3090,7 @@ static void nfs4_close_done(struct rpc_task *task, void *data) } } -/* hmm. we are done with the inode, and in the process of freeing +/* hmm. we are done with the inode, and in the process of freeing * the state_owner. we keep this around to process errors */ switch (task->tk_status) {
@@ -4941,8 +4941,8 @@ static int buf_to_pages_noslab(const void *buf, size_t buflen,if (newpage ==NULL ) goto unwind;memcpy (page_address (newpage), buf, len); - buf += len; - buflen -= len; + buf += len; + buflen -= len; *pages++ = newpage; rc++; }while (buflen !=0 );
@@ -5265,8 +5265,8 @@ static int _nfs4_do_set_security_label(struct inode *inode,struct nfs_server *server =NFS_SERVER (inode);const u32 bitmask[3 ] = {0 ,0 ,FATTR4_WORD2_SECURITY_LABEL };struct nfs_setattrargs arg = { - .fh =NFS_FH (inode), - .iap = &sattr, + .fh =NFS_FH (inode), + .iap = &sattr, .server = server, .bitmask = bitmask, .label = ilabel,
@@ -5277,9 +5277,9 @@ static int _nfs4_do_set_security_label(struct inode *inode, .server = server, };struct rpc_message msg = { - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETATTR ], - .rpc_argp = &arg, - .rpc_resp = &res, + .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETATTR ], + .rpc_argp = &arg, + .rpc_resp = &res, };int status;
@@ -5825,8 +5825,8 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock };struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOCKT ], - .rpc_argp = &arg, - .rpc_resp = &res, + .rpc_argp = &arg, + .rpc_resp = &res, .rpc_cred = state->owner->so_cred, };struct nfs4_lock_state *lsp;
Signature · 1 line
2.11.0