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/nfs/nfs4state.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/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 52a26baa114c..0675f3215e0a 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -69,10 +69,8 @@ init_nfsv4_state(struct nfs_server *server) | |||
69 | void | 69 | void |
70 | destroy_nfsv4_state(struct nfs_server *server) | 70 | destroy_nfsv4_state(struct nfs_server *server) |
71 | { | 71 | { |
72 | if (server->mnt_path) { | 72 | kfree(server->mnt_path); |
73 | kfree(server->mnt_path); | 73 | server->mnt_path = NULL; |
74 | server->mnt_path = NULL; | ||
75 | } | ||
76 | if (server->nfs4_state) { | 74 | if (server->nfs4_state) { |
77 | nfs4_put_client(server->nfs4_state); | 75 | nfs4_put_client(server->nfs4_state); |
78 | server->nfs4_state = NULL; | 76 | server->nfs4_state = NULL; |
@@ -311,8 +309,7 @@ struct nfs4_state_owner *nfs4_get_state_owner(struct nfs_server *server, struct | |||
311 | new = NULL; | 309 | new = NULL; |
312 | } | 310 | } |
313 | spin_unlock(&clp->cl_lock); | 311 | spin_unlock(&clp->cl_lock); |
314 | if (new) | 312 | kfree(new); |
315 | kfree(new); | ||
316 | if (sp != NULL) | 313 | if (sp != NULL) |
317 | return sp; | 314 | return sp; |
318 | put_rpccred(cred); | 315 | put_rpccred(cred); |