Skip to content

Commit

Permalink
sunrpc: destroy rpc_inode_cachep after unregister_filesystem
Browse files Browse the repository at this point in the history
Better to unregister the file system before destroying the kmem_cache
cache of the inodes, so that the inodes are freed before we are trying
to destroy it. Otherwise, kmem_cache yells that some objects are live.

Signed-off-by: Dan Aloni <dan@kernelim.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Dan Aloni authored and Trond Myklebust committed Jul 17, 2020
1 parent 57f80c0 commit 4a400f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/rpc_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,6 @@ int register_rpc_pipefs(void)
void unregister_rpc_pipefs(void)
{
rpc_clients_notifier_unregister();
kmem_cache_destroy(rpc_inode_cachep);
unregister_filesystem(&rpc_pipe_fs_type);
kmem_cache_destroy(rpc_inode_cachep);
}

0 comments on commit 4a400f0

Please sign in to comment.