aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-01-27 16:26:02 -0500
committerJ. Bruce Fields <bfields@redhat.com>2012-03-06 18:13:36 -0500
commit41fd1e42f861e50e49f3d44127596344f2505f01 (patch)
treebeffdd3a5bbbf72eb6efa329aaa92022035f27fa /fs/nfsd/nfs4proc.c
parent508dc6e110c6dbdc0bbe84298ccfe22de7538486 (diff)
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.c8
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
247 if (is_create_with_attrs(open) && open->op_acl != NULL) 247 if (is_create_with_attrs(open) && open->op_acl != NULL)
248 do_set_nfs4_acl(rqstp, &resfh, open->op_acl, open->op_bmval); 248 do_set_nfs4_acl(rqstp, &resfh, open->op_acl, open->op_bmval);
249 249
250 set_change_info(&open->op_cinfo, current_fh);
251 fh_dup2(current_fh, &resfh);
252
253 /* set reply cache */ 250 /* set reply cache */
254 fh_copy_shallow(&open->op_openowner->oo_owner.so_replay.rp_openfh, 251 fh_copy_shallow(&open->op_openowner->oo_owner.so_replay.rp_openfh,
255 &resfh.fh_handle); 252 &resfh.fh_handle);
256 if (!open->op_created) 253 if (!open->op_created)
257 status = do_open_permission(rqstp, current_fh, open, 254 status = do_open_permission(rqstp, &resfh, open,
258 NFSD_MAY_NOP); 255 NFSD_MAY_NOP);
259 256 set_change_info(&open->op_cinfo, current_fh);
257 fh_dup2(current_fh, &resfh);
260out: 258out:
261 fh_put(&resfh); 259 fh_put(&resfh);
262 return status; 260 return status;