fs: fs/super.c needs to include backing-dev.h for !CONFIG_BLOCK
[cascardo/linux.git] / fs / gfs2 / lock_dlm.c
index 0e5e0e7..0e0470e 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <linux/fs.h>
 #include <linux/dlm.h>
+#include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/gfs2_ondisk.h>
 
@@ -30,7 +31,10 @@ static void gdlm_ast(void *arg)
 
        switch (gl->gl_lksb.sb_status) {
        case -DLM_EUNLOCK: /* Unlocked, so glock can be freed */
-               kmem_cache_free(gfs2_glock_cachep, gl);
+               if (gl->gl_ops->go_flags & GLOF_ASPACE)
+                       kmem_cache_free(gfs2_glock_aspace_cachep, gl);
+               else
+                       kmem_cache_free(gfs2_glock_cachep, gl);
                if (atomic_dec_and_test(&sdp->sd_glock_disposal))
                        wake_up(&sdp->sd_glock_wait);
                return;