diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2006-01-18 20:43:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-18 22:20:26 -0500 |
commit | 375c5547cbf39423078535affac66c8afdc8fafb (patch) | |
tree | 2893ae003e8d2dc4ef6d5d1d1e6fa34656034a85 /fs | |
parent | ae8b625313db4dd4b060962c2a02f3a2837ca61b (diff) |
[PATCH] nfsd4: nfs4state.c miscellaneous goto removals
Remove some goto's that made the logic here a little more tortuous than
necessary.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
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 | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 69ee182575ab..89028f2d8d26 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -592,25 +592,21 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_se | |||
592 | status = nfs_ok; | 592 | status = nfs_ok; |
593 | if (setattr->sa_iattr.ia_valid & ATTR_SIZE) { | 593 | if (setattr->sa_iattr.ia_valid & ATTR_SIZE) { |
594 | nfs4_lock_state(); | 594 | nfs4_lock_state(); |
595 | if ((status = nfs4_preprocess_stateid_op(current_fh, | 595 | status = nfs4_preprocess_stateid_op(current_fh, |
596 | &setattr->sa_stateid, | 596 | &setattr->sa_stateid, CHECK_FH | WR_STATE, NULL); |
597 | CHECK_FH | WR_STATE, NULL))) { | ||
598 | dprintk("NFSD: nfsd4_setattr: couldn't process stateid!\n"); | ||
599 | goto out_unlock; | ||
600 | } | ||
601 | nfs4_unlock_state(); | 597 | nfs4_unlock_state(); |
598 | if (status) { | ||
599 | dprintk("NFSD: nfsd4_setattr: couldn't process stateid!"); | ||
600 | return status; | ||
601 | } | ||
602 | } | 602 | } |
603 | status = nfs_ok; | 603 | status = nfs_ok; |
604 | if (setattr->sa_acl != NULL) | 604 | if (setattr->sa_acl != NULL) |
605 | status = nfsd4_set_nfs4_acl(rqstp, current_fh, setattr->sa_acl); | 605 | status = nfsd4_set_nfs4_acl(rqstp, current_fh, setattr->sa_acl); |
606 | if (status) | 606 | if (status) |
607 | goto out; | 607 | return status; |
608 | status = nfsd_setattr(rqstp, current_fh, &setattr->sa_iattr, | 608 | status = nfsd_setattr(rqstp, current_fh, &setattr->sa_iattr, |
609 | 0, (time_t)0); | 609 | 0, (time_t)0); |
610 | out: | ||
611 | return status; | ||
612 | out_unlock: | ||
613 | nfs4_unlock_state(); | ||
614 | return status; | 610 | return status; |
615 | } | 611 | } |
616 | 612 | ||
@@ -628,15 +624,17 @@ nfsd4_write(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_writ | |||
628 | return nfserr_inval; | 624 | return nfserr_inval; |
629 | 625 | ||
630 | nfs4_lock_state(); | 626 | nfs4_lock_state(); |
631 | if ((status = nfs4_preprocess_stateid_op(current_fh, stateid, | 627 | status = nfs4_preprocess_stateid_op(current_fh, stateid, |
632 | CHECK_FH | WR_STATE, &filp))) { | 628 | CHECK_FH | WR_STATE, &filp); |
633 | dprintk("NFSD: nfsd4_write: couldn't process stateid!\n"); | ||
634 | goto out; | ||
635 | } | ||
636 | if (filp) | 629 | if (filp) |
637 | get_file(filp); | 630 | get_file(filp); |
638 | nfs4_unlock_state(); | 631 | nfs4_unlock_state(); |
639 | 632 | ||
633 | if (status) { | ||
634 | dprintk("NFSD: nfsd4_write: couldn't process stateid!\n"); | ||
635 | return status; | ||
636 | } | ||
637 | |||
640 | write->wr_bytes_written = write->wr_buflen; | 638 | write->wr_bytes_written = write->wr_buflen; |
641 | write->wr_how_written = write->wr_stable_how; | 639 | write->wr_how_written = write->wr_stable_how; |
642 | p = (u32 *)write->wr_verifier.data; | 640 | p = (u32 *)write->wr_verifier.data; |
@@ -652,9 +650,6 @@ nfsd4_write(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_writ | |||
652 | if (status == nfserr_symlink) | 650 | if (status == nfserr_symlink) |
653 | status = nfserr_inval; | 651 | status = nfserr_inval; |
654 | return status; | 652 | return status; |
655 | out: | ||
656 | nfs4_unlock_state(); | ||
657 | return status; | ||
658 | } | 653 | } |
659 | 654 | ||
660 | /* This routine never returns NFS_OK! If there are no other errors, it | 655 | /* This routine never returns NFS_OK! If there are no other errors, it |