diff options
author | J. Bruce Fields <bfields@fieldses.org> | 2006-11-08 17:44:39 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-11-08 18:29:22 -0800 |
commit | af85852de0b32d92b14295aa6f5ba3a9ad044cf6 (patch) | |
tree | 8288e5f06437260803accb678ccf448716fbfb5d /fs | |
parent | 75b2bd55bd7724c727856fbdf3ab71d2e4287ac8 (diff) | |
download | linux-3.10-af85852de0b32d92b14295aa6f5ba3a9ad044cf6.tar.gz linux-3.10-af85852de0b32d92b14295aa6f5ba3a9ad044cf6.tar.bz2 linux-3.10-af85852de0b32d92b14295aa6f5ba3a9ad044cf6.zip |
[PATCH] nfsd4: reindent do_open_lookup()
Minor rearrangement, cleanup of do_open_lookup(). No change in behavior.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Acked-by: Neil Brown <neilb@suse.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 0a7bbdc4a10..4a73f5b2546 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -106,27 +106,25 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o open->op_fname.len, &open->op_iattr, &resfh, open->op_createmode, (u32 *)open->op_verf.data, &open->op_truncate); - } - else { + } else { status = nfsd_lookup(rqstp, current_fh, open->op_fname.data, open->op_fname.len, &resfh); fh_unlock(current_fh); } + if (status) + goto out; - if (!status) { - set_change_info(&open->op_cinfo, current_fh); + set_change_info(&open->op_cinfo, current_fh); - /* set reply cache */ - fh_dup2(current_fh, &resfh); - open->op_stateowner->so_replay.rp_openfh_len = - resfh.fh_handle.fh_size; - memcpy(open->op_stateowner->so_replay.rp_openfh, - &resfh.fh_handle.fh_base, - resfh.fh_handle.fh_size); + /* set reply cache */ + fh_dup2(current_fh, &resfh); + open->op_stateowner->so_replay.rp_openfh_len = resfh.fh_handle.fh_size; + memcpy(open->op_stateowner->so_replay.rp_openfh, + &resfh.fh_handle.fh_base, resfh.fh_handle.fh_size); - status = do_open_permission(rqstp, current_fh, open, MAY_NOP); - } + status = do_open_permission(rqstp, current_fh, open, MAY_NOP); +out: fh_put(&resfh); return status; } |