cifs: Change from mempool_destroy to mempool_exit for request pools
authorSteve French <stfrench@microsoft.com>
Mon, 13 May 2024 17:49:22 +0000 (12:49 -0500)
committerSteve French <stfrench@microsoft.com>
Mon, 13 May 2024 21:49:36 +0000 (16:49 -0500)
insmod followed by rmmod was oopsing with the new mempools cifs request patch

Fixes: edea94a69730 ("cifs: Add mempools for cifs_io_request and cifs_io_subrequest structs")
Suggested-by: David Howells <dhowells@redhat.com>
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsfs.c

index 6e1698614745b7c61bf23b17e6adaaa7ff68fbd8..ec5b639f421a27e46c894ff977237eb4c994942f 100644 (file)
@@ -1790,9 +1790,9 @@ nomem_req:
 
 static void cifs_destroy_netfs(void)
 {
-       mempool_destroy(&cifs_io_subrequest_pool);
+       mempool_exit(&cifs_io_subrequest_pool);
        kmem_cache_destroy(cifs_io_subrequest_cachep);
-       mempool_destroy(&cifs_io_request_pool);
+       mempool_exit(&cifs_io_request_pool);
        kmem_cache_destroy(cifs_io_request_cachep);
 }