aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r--fs/fuse/inode.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index fb77e0962132..3141690558c8 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -488,7 +488,12 @@ static struct fuse_conn *new_conn(struct super_block *sb)
488 err = bdi_init(&fc->bdi); 488 err = bdi_init(&fc->bdi);
489 if (err) 489 if (err)
490 goto error_kfree; 490 goto error_kfree;
491 err = bdi_register_dev(&fc->bdi, fc->dev); 491 if (sb->s_bdev) {
492 err = bdi_register(&fc->bdi, NULL, "%u:%u-fuseblk",
493 MAJOR(fc->dev), MINOR(fc->dev));
494 } else {
495 err = bdi_register_dev(&fc->bdi, fc->dev);
496 }
492 if (err) 497 if (err)
493 goto error_bdi_destroy; 498 goto error_bdi_destroy;
494 /* 499 /*
@@ -586,7 +591,7 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
586 fc->bdi.ra_pages = min(fc->bdi.ra_pages, ra_pages); 591 fc->bdi.ra_pages = min(fc->bdi.ra_pages, ra_pages);
587 fc->minor = arg->minor; 592 fc->minor = arg->minor;
588 fc->max_write = arg->minor < 5 ? 4096 : arg->max_write; 593 fc->max_write = arg->minor < 5 ? 4096 : arg->max_write;
589 fc->max_write = min_t(unsigned, 4096, fc->max_write); 594 fc->max_write = max_t(unsigned, 4096, fc->max_write);
590 fc->conn_init = 1; 595 fc->conn_init = 1;
591 } 596 }
592 fuse_put_request(fc, req); 597 fuse_put_request(fc, req);
@@ -662,7 +667,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
662 fc->flags = d.flags; 667 fc->flags = d.flags;
663 fc->user_id = d.user_id; 668 fc->user_id = d.user_id;
664 fc->group_id = d.group_id; 669 fc->group_id = d.group_id;
665 fc->max_read = min_t(unsigned, 4096, d.max_read); 670 fc->max_read = max_t(unsigned, 4096, d.max_read);
666 671
667 /* Used by get_root_inode() */ 672 /* Used by get_root_inode() */
668 sb->s_fs_info = fc; 673 sb->s_fs_info = fc;