fuse: check s_root when destroying sb
[linux-2.6-microblaze.git] / fs / fuse / virtio_fs.c
index 0ad89c6..32fd138 100644 (file)
@@ -1394,7 +1394,7 @@ static void virtio_kill_sb(struct super_block *sb)
        bool last;
 
        /* If mount failed, we can still be called without any fc */
-       if (fm) {
+       if (sb->s_root) {
                last = fuse_mount_remove(fm);
                if (last)
                        virtio_fs_conn_destroy(fm);