diff options
author | Akinobu Mita <akinobu.mita@gmail..com> | 2007-06-04 18:14:59 +0200 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-06-04 18:14:59 +0200 |
commit | e6985c7f6842fa040d058640e363140ad1730dc5 (patch) | |
tree | f4490bc37a43968b35014dbd40463275b6ead59f | |
parent | [CIFS] typo in previous patch (diff) | |
download | linux-e6985c7f6842fa040d058640e363140ad1730dc5.tar.xz linux-e6985c7f6842fa040d058640e363140ad1730dc5.zip |
[CIFS] fix mempool destroy done in wrong order in cifs error path
Slab cache used as memory pool can not be destroyed before the memory
pool destruction. Because the memory pool still holds some objects and
kmem_cache_destroy() says "Can't free all objects".
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r-- | fs/cifs/cifsfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index d38c69b591cf..7c04752b76cb 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -825,8 +825,8 @@ cifs_init_mids(void) sizeof (struct oplock_q_entry), 0, SLAB_HWCACHE_ALIGN, NULL, NULL); if (cifs_oplock_cachep == NULL) { - kmem_cache_destroy(cifs_mid_cachep); mempool_destroy(cifs_mid_poolp); + kmem_cache_destroy(cifs_mid_cachep); return -ENOMEM; } |