diff options
author | Fred Isaman <iisaman@netapp.com> | 2011-01-06 06:36:24 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-01-06 14:46:31 -0500 |
commit | c31663d4a1fac5ce1954d656cbcf80eb883b814a (patch) | |
tree | 9f5b3ff8cc4565f8e46217954cb4104228272392 /fs/nfs/nfs4proc.c | |
parent | 4541d16c024ce40a0781e03c185ecdfe34aec46f (diff) |
pnfs: layoutget rpc code cleanup
No functional changes, just some code minor code rearrangement and
comments.
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 28e175e74de2..5bee453d36d6 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -5293,10 +5293,14 @@ static void | |||
5293 | nfs4_layoutget_prepare(struct rpc_task *task, void *calldata) | 5293 | nfs4_layoutget_prepare(struct rpc_task *task, void *calldata) |
5294 | { | 5294 | { |
5295 | struct nfs4_layoutget *lgp = calldata; | 5295 | struct nfs4_layoutget *lgp = calldata; |
5296 | struct inode *ino = lgp->args.inode; | 5296 | struct nfs_server *server = NFS_SERVER(lgp->args.inode); |
5297 | struct nfs_server *server = NFS_SERVER(ino); | ||
5298 | 5297 | ||
5299 | dprintk("--> %s\n", __func__); | 5298 | dprintk("--> %s\n", __func__); |
5299 | /* Note the is a race here, where a CB_LAYOUTRECALL can come in | ||
5300 | * right now covering the LAYOUTGET we are about to send. | ||
5301 | * However, that is not so catastrophic, and there seems | ||
5302 | * to be no way to prevent it completely. | ||
5303 | */ | ||
5300 | if (nfs4_setup_sequence(server, &lgp->args.seq_args, | 5304 | if (nfs4_setup_sequence(server, &lgp->args.seq_args, |
5301 | &lgp->res.seq_res, 0, task)) | 5305 | &lgp->res.seq_res, 0, task)) |
5302 | return; | 5306 | return; |
@@ -5379,13 +5383,10 @@ int nfs4_proc_layoutget(struct nfs4_layoutget *lgp) | |||
5379 | if (IS_ERR(task)) | 5383 | if (IS_ERR(task)) |
5380 | return PTR_ERR(task); | 5384 | return PTR_ERR(task); |
5381 | status = nfs4_wait_for_completion_rpc_task(task); | 5385 | status = nfs4_wait_for_completion_rpc_task(task); |
5382 | if (status != 0) | 5386 | if (status == 0) |
5383 | goto out; | 5387 | status = task->tk_status; |
5384 | status = task->tk_status; | 5388 | if (status == 0) |
5385 | if (status != 0) | 5389 | status = pnfs_layout_process(lgp); |
5386 | goto out; | ||
5387 | status = pnfs_layout_process(lgp); | ||
5388 | out: | ||
5389 | rpc_put_task(task); | 5390 | rpc_put_task(task); |
5390 | dprintk("<-- %s status=%d\n", __func__, status); | 5391 | dprintk("<-- %s status=%d\n", __func__, status); |
5391 | return status; | 5392 | return status; |