diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-01-27 22:26:02 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-03-07 00:13:36 +0100 |
commit | 41fd1e42f861e50e49f3d44127596344f2505f01 (patch) | |
tree | beffdd3a5bbbf72eb6efa329aaa92022035f27fa /fs/nfsd/nfs4proc.c | |
parent | nfsd41: free_session/free_client must be called under the client_lock (diff) | |
download | linux-41fd1e42f861e50e49f3d44127596344f2505f01.tar.xz linux-41fd1e42f861e50e49f3d44127596344f2505f01.zip |
nfsd4: delay setting current filehandle till success
Compound processing stops on error, so the current filehandle won't be
used on error. Thus the order here doesn't really matter. It'll be
more convenient to do it later, though.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index cdb7ca337187..bdb71a57c94e 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -247,16 +247,14 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o if (is_create_with_attrs(open) && open->op_acl != NULL) do_set_nfs4_acl(rqstp, &resfh, open->op_acl, open->op_bmval); - set_change_info(&open->op_cinfo, current_fh); - fh_dup2(current_fh, &resfh); - /* set reply cache */ fh_copy_shallow(&open->op_openowner->oo_owner.so_replay.rp_openfh, &resfh.fh_handle); if (!open->op_created) - status = do_open_permission(rqstp, current_fh, open, + status = do_open_permission(rqstp, &resfh, open, NFSD_MAY_NOP); - + set_change_info(&open->op_cinfo, current_fh); + fh_dup2(current_fh, &resfh); out: fh_put(&resfh); return status; |