diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-01-16 17:11:11 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-01-07 16:01:17 -0500 |
commit | 6b6d8137f1d3fc7a3970e1e384b8ce2d0967e087 (patch) | |
tree | 613e1a228da94041e6b68495bf51a59031f7cae9 | |
parent | bba0f88bf7c4ad467eeb3a17443de1f9cd0437e0 (diff) |
nfsd4: nfsd4_encode_fattr cleanup
Remove some pointless goto's.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 5bef9cb84b07..3bffba63e6a0 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -2230,8 +2230,10 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, | |||
2230 | if ((buflen -= 4) < 0) | 2230 | if ((buflen -= 4) < 0) |
2231 | goto out_resource; | 2231 | goto out_resource; |
2232 | dummy = nfs4_file_type(stat.mode); | 2232 | dummy = nfs4_file_type(stat.mode); |
2233 | if (dummy == NF4BAD) | 2233 | if (dummy == NF4BAD) { |
2234 | goto out_serverfault; | 2234 | status = nfserr_serverfault; |
2235 | goto out; | ||
2236 | } | ||
2235 | WRITE32(dummy); | 2237 | WRITE32(dummy); |
2236 | } | 2238 | } |
2237 | if (bmval0 & FATTR4_WORD0_FH_EXPIRE_TYPE) { | 2239 | if (bmval0 & FATTR4_WORD0_FH_EXPIRE_TYPE) { |
@@ -2325,8 +2327,6 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, | |||
2325 | WRITE32(ace->flag); | 2327 | WRITE32(ace->flag); |
2326 | WRITE32(ace->access_mask & NFS4_ACE_MASK_ALL); | 2328 | WRITE32(ace->access_mask & NFS4_ACE_MASK_ALL); |
2327 | status = nfsd4_encode_aclname(rqstp, ace, &p, &buflen); | 2329 | status = nfsd4_encode_aclname(rqstp, ace, &p, &buflen); |
2328 | if (status == nfserr_resource) | ||
2329 | goto out_resource; | ||
2330 | if (status) | 2330 | if (status) |
2331 | goto out; | 2331 | goto out; |
2332 | } | 2332 | } |
@@ -2387,8 +2387,6 @@ out_acl: | |||
2387 | } | 2387 | } |
2388 | if (bmval0 & FATTR4_WORD0_FS_LOCATIONS) { | 2388 | if (bmval0 & FATTR4_WORD0_FS_LOCATIONS) { |
2389 | status = nfsd4_encode_fs_locations(rqstp, exp, &p, &buflen); | 2389 | status = nfsd4_encode_fs_locations(rqstp, exp, &p, &buflen); |
2390 | if (status == nfserr_resource) | ||
2391 | goto out_resource; | ||
2392 | if (status) | 2390 | if (status) |
2393 | goto out; | 2391 | goto out; |
2394 | } | 2392 | } |
@@ -2439,15 +2437,11 @@ out_acl: | |||
2439 | } | 2437 | } |
2440 | if (bmval1 & FATTR4_WORD1_OWNER) { | 2438 | if (bmval1 & FATTR4_WORD1_OWNER) { |
2441 | status = nfsd4_encode_user(rqstp, stat.uid, &p, &buflen); | 2439 | status = nfsd4_encode_user(rqstp, stat.uid, &p, &buflen); |
2442 | if (status == nfserr_resource) | ||
2443 | goto out_resource; | ||
2444 | if (status) | 2440 | if (status) |
2445 | goto out; | 2441 | goto out; |
2446 | } | 2442 | } |
2447 | if (bmval1 & FATTR4_WORD1_OWNER_GROUP) { | 2443 | if (bmval1 & FATTR4_WORD1_OWNER_GROUP) { |
2448 | status = nfsd4_encode_group(rqstp, stat.gid, &p, &buflen); | 2444 | status = nfsd4_encode_group(rqstp, stat.gid, &p, &buflen); |
2449 | if (status == nfserr_resource) | ||
2450 | goto out_resource; | ||
2451 | if (status) | 2445 | if (status) |
2452 | goto out; | 2446 | goto out; |
2453 | } | 2447 | } |
@@ -2550,9 +2544,6 @@ out_nfserr: | |||
2550 | out_resource: | 2544 | out_resource: |
2551 | status = nfserr_resource; | 2545 | status = nfserr_resource; |
2552 | goto out; | 2546 | goto out; |
2553 | out_serverfault: | ||
2554 | status = nfserr_serverfault; | ||
2555 | goto out; | ||
2556 | } | 2547 | } |
2557 | 2548 | ||
2558 | static inline int attributes_need_mount(u32 *bmval) | 2549 | static inline int attributes_need_mount(u32 *bmval) |