Skip to content

Commit

Permalink
[PATCH] nfsd4: reindent do_open_lookup()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Nov 9, 2006
1 parent 75b2bd5 commit af85852
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions fs/nfsd/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit af85852

Please sign in to comment.