aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@fieldses.org>2006-11-08 20:44:39 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-08 21:29:22 -0500
commitaf85852de0b32d92b14295aa6f5ba3a9ad044cf6 (patch)
tree8288e5f06437260803accb678ccf448716fbfb5d /fs/nfsd/nfs4proc.c
parent75b2bd55bd7724c727856fbdf3ab71d2e4287ac8 (diff)
[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/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 0a7bbdc4a10a..4a73f5b2546f 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
106 open->op_fname.len, &open->op_iattr, 106 open->op_fname.len, &open->op_iattr,
107 &resfh, open->op_createmode, 107 &resfh, open->op_createmode,
108 (u32 *)open->op_verf.data, &open->op_truncate); 108 (u32 *)open->op_verf.data, &open->op_truncate);
109 } 109 } else {
110 else {
111 status = nfsd_lookup(rqstp, current_fh, 110 status = nfsd_lookup(rqstp, current_fh,
112 open->op_fname.data, open->op_fname.len, &resfh); 111 open->op_fname.data, open->op_fname.len, &resfh);
113 fh_unlock(current_fh); 112 fh_unlock(current_fh);
114 } 113 }
114 if (status)
115 goto out;
115 116
116 if (!status) { 117 set_change_info(&open->op_cinfo, current_fh);
117 set_change_info(&open->op_cinfo, current_fh);
118 118
119 /* set reply cache */ 119 /* set reply cache */
120 fh_dup2(current_fh, &resfh); 120 fh_dup2(current_fh, &resfh);
121 open->op_stateowner->so_replay.rp_openfh_len = 121 open->op_stateowner->so_replay.rp_openfh_len = resfh.fh_handle.fh_size;
122 resfh.fh_handle.fh_size; 122 memcpy(open->op_stateowner->so_replay.rp_openfh,
123 memcpy(open->op_stateowner->so_replay.rp_openfh, 123 &resfh.fh_handle.fh_base, resfh.fh_handle.fh_size);
124 &resfh.fh_handle.fh_base,
125 resfh.fh_handle.fh_size);
126 124
127 status = do_open_permission(rqstp, current_fh, open, MAY_NOP); 125 status = do_open_permission(rqstp, current_fh, open, MAY_NOP);
128 }
129 126
127out:
130 fh_put(&resfh); 128 fh_put(&resfh);
131 return status; 129 return status;
132} 130}