]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/fuse/inode.c
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
[karo-tx-linux.git] / fs / fuse / inode.c
index 5a1b58f8fef4d2437842b73d4c1c12b2e87a32c9..65c88379a3a14311cca68b8750d6bb0b9f107444 100644 (file)
@@ -975,8 +975,15 @@ static int fuse_bdi_init(struct fuse_conn *fc, struct super_block *sb)
        int err;
        char *suffix = "";
 
-       if (sb->s_bdev)
+       if (sb->s_bdev) {
                suffix = "-fuseblk";
+               /*
+                * sb->s_bdi points to blkdev's bdi however we want to redirect
+                * it to our private bdi...
+                */
+               bdi_put(sb->s_bdi);
+               sb->s_bdi = &noop_backing_dev_info;
+       }
        err = super_setup_bdi_name(sb, "%u:%u%s", MAJOR(fc->dev),
                                   MINOR(fc->dev), suffix);
        if (err)