* [PATCH] nfsd: clean up unnecessary temporary variable in nfsd4_decode_fattr
@ 2013-12-09 10:23 Kinglong Mee
2013-12-12 16:35 ` J. Bruce Fields
0 siblings, 1 reply; 2+ messages in thread
From: Kinglong Mee @ 2013-12-09 10:23 UTC (permalink / raw)
To: J. Bruce Fields; +Cc: linux-nfs
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>
---
fs/nfsd/nfs4xdr.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index fd48536..91afb1c 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -252,7 +252,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;
@@ -279,10 +278,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;
@@ -420,10 +418,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
--
1.8.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfsd: clean up unnecessary temporary variable in nfsd4_decode_fattr
2013-12-09 10:23 [PATCH] nfsd: clean up unnecessary temporary variable in nfsd4_decode_fattr Kinglong Mee
@ 2013-12-12 16:35 ` J. Bruce Fields
0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2013-12-12 16:35 UTC (permalink / raw)
To: Kinglong Mee; +Cc: linux-nfs
Thanks, applying.--b.
On Mon, Dec 09, 2013 at 06:23:46PM +0800, Kinglong Mee wrote:
> 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>
> ---
> fs/nfsd/nfs4xdr.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index fd48536..91afb1c 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -252,7 +252,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;
> @@ -279,10 +278,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;
> @@ -420,10 +418,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
> --
> 1.8.4.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-12 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-09 10:23 [PATCH] nfsd: clean up unnecessary temporary variable in nfsd4_decode_fattr Kinglong Mee
2013-12-12 16:35 ` J. Bruce Fields
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.