diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:06 -0500 |
commit | f99d49adf527fa6f7a9c42257fa76bca6b8df1e3 (patch) | |
tree | 41dddbc336016f9dc9557cdb15300de5e599dac1 /fs/nfsd/nfs4xdr.c | |
parent | 6044ec8882c726e325017bd948aa0cd94ad33abc (diff) |
[PATCH] kfree cleanup: fs
This is the fs/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in fs/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 4c4146350236..dcd673186944 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -151,8 +151,7 @@ static u32 *read_buf(struct nfsd4_compoundargs *argp, int nbytes) | |||
151 | if (nbytes <= sizeof(argp->tmp)) | 151 | if (nbytes <= sizeof(argp->tmp)) |
152 | p = argp->tmp; | 152 | p = argp->tmp; |
153 | else { | 153 | else { |
154 | if (argp->tmpp) | 154 | kfree(argp->tmpp); |
155 | kfree(argp->tmpp); | ||
156 | p = argp->tmpp = kmalloc(nbytes, GFP_KERNEL); | 155 | p = argp->tmpp = kmalloc(nbytes, GFP_KERNEL); |
157 | if (!p) | 156 | if (!p) |
158 | return NULL; | 157 | return NULL; |
@@ -2476,10 +2475,8 @@ void nfsd4_release_compoundargs(struct nfsd4_compoundargs *args) | |||
2476 | kfree(args->ops); | 2475 | kfree(args->ops); |
2477 | args->ops = args->iops; | 2476 | args->ops = args->iops; |
2478 | } | 2477 | } |
2479 | if (args->tmpp) { | 2478 | kfree(args->tmpp); |
2480 | kfree(args->tmpp); | 2479 | args->tmpp = NULL; |
2481 | args->tmpp = NULL; | ||
2482 | } | ||
2483 | while (args->to_free) { | 2480 | while (args->to_free) { |
2484 | struct tmpbuf *tb = args->to_free; | 2481 | struct tmpbuf *tb = args->to_free; |
2485 | args->to_free = tb->next; | 2482 | args->to_free = tb->next; |