[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>
This commit is contained in:
committed by
Linus Torvalds
parent
6044ec8882
commit
f99d49adf5
@@ -69,10 +69,8 @@ init_nfsv4_state(struct nfs_server *server)
|
||||
void
|
||||
destroy_nfsv4_state(struct nfs_server *server)
|
||||
{
|
||||
if (server->mnt_path) {
|
||||
kfree(server->mnt_path);
|
||||
server->mnt_path = NULL;
|
||||
}
|
||||
kfree(server->mnt_path);
|
||||
server->mnt_path = NULL;
|
||||
if (server->nfs4_state) {
|
||||
nfs4_put_client(server->nfs4_state);
|
||||
server->nfs4_state = NULL;
|
||||
@@ -311,8 +309,7 @@ struct nfs4_state_owner *nfs4_get_state_owner(struct nfs_server *server, struct
|
||||
new = NULL;
|
||||
}
|
||||
spin_unlock(&clp->cl_lock);
|
||||
if (new)
|
||||
kfree(new);
|
||||
kfree(new);
|
||||
if (sp != NULL)
|
||||
return sp;
|
||||
put_rpccred(cred);
|
||||
|
||||
Reference in New Issue
Block a user