diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2013-12-09 11:23:46 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-01-03 19:44:23 +0100 |
commit | eba1c99ce4590506516ec801d991e36aa8b0d436 (patch) | |
tree | ae63a31abbce62b6cdb86420e5ac2468861b7add /fs/nfsd | |
parent | nfsd: using nfsd4_encode_noop for encoding destroy_session/free_stateid (diff) | |
download | linux-eba1c99ce4590506516ec801d991e36aa8b0d436.tar.xz linux-eba1c99ce4590506516ec801d991e36aa8b0d436.zip |
nfsd: clean up unnecessary temporary variable in nfsd4_decode_fattr
host_err was only used for nfs4_acl_new.
This patch delete it, and return nfserr_jukebox directly.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 776d2f639d6e..b77f6bdd522a 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -276,7 +276,6 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, int expected_len, len = 0; u32 dummy32; char *buf; - int host_err; DECODE_HEAD; iattr->ia_valid = 0; @@ -303,10 +302,9 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, return nfserr_resource; *acl = nfs4_acl_new(nace); - if (*acl == NULL) { - host_err = -ENOMEM; - goto out_nfserr; - } + if (*acl == NULL) + return nfserr_jukebox; + defer_free(argp, kfree, *acl); (*acl)->naces = nace; @@ -444,10 +442,6 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, goto xdr_error; DECODE_TAIL; - -out_nfserr: - status = nfserrno(host_err); - goto out; } static __be32 |