diff options
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); |