]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/ubifs/super.c
push BKL down into ->put_super
[net-next-2.6.git] / fs / ubifs / super.c
index 84f3c7fd155247fb662944276d9da8f7920b50a7..522c3fd7eb3ca0d6659141f2523a470389431000 100644 (file)
@@ -1684,6 +1684,9 @@ static void ubifs_put_super(struct super_block *sb)
 
        ubifs_msg("un-mount UBI device %d, volume %d", c->vi.ubi_num,
                  c->vi.vol_id);
+
+       lock_kernel();
+
        /*
         * The following asserts are only valid if there has not been a failure
         * of the media. For example, there will be dirty inodes if we failed
@@ -1750,6 +1753,8 @@ static void ubifs_put_super(struct super_block *sb)
        ubi_close_volume(c->ubi);
        mutex_unlock(&c->umount_mutex);
        kfree(c);
+
+       unlock_kernel();
 }
 
 static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)