diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/export.c | 6 | ||||
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 9 | ||||
-rw-r--r-- | fs/nfsd/nfscache.c | 3 |
3 files changed, 6 insertions, 12 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 057aff745506..417ec02df44f 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -190,8 +190,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen) | |||
190 | out: | 190 | out: |
191 | if (dom) | 191 | if (dom) |
192 | auth_domain_put(dom); | 192 | auth_domain_put(dom); |
193 | if (buf) | 193 | kfree(buf); |
194 | kfree(buf); | ||
195 | return err; | 194 | return err; |
196 | } | 195 | } |
197 | 196 | ||
@@ -428,8 +427,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen) | |||
428 | path_release(&nd); | 427 | path_release(&nd); |
429 | if (dom) | 428 | if (dom) |
430 | auth_domain_put(dom); | 429 | auth_domain_put(dom); |
431 | if (buf) | 430 | kfree(buf); |
432 | kfree(buf); | ||
433 | return err; | 431 | return err; |
434 | } | 432 | } |
435 | 433 | ||
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; |
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index 119e4d4495b8..d852ebb538e3 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c | |||
@@ -93,8 +93,7 @@ nfsd_cache_shutdown(void) | |||
93 | 93 | ||
94 | cache_disabled = 1; | 94 | cache_disabled = 1; |
95 | 95 | ||
96 | if (hash_list) | 96 | kfree (hash_list); |
97 | kfree (hash_list); | ||
98 | hash_list = NULL; | 97 | hash_list = NULL; |
99 | } | 98 | } |
100 | 99 | ||