]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/fuse/inode.c
ALSA: Fix a const to non-const assignment in the Digigram VXpocket sound driver
[linux-2.6-omap-h63xx.git] / fs / fuse / inode.c
index fb77e0962132ea5ee1d2f9dc28f97206335f9125..3141690558c8aa6029128f7c2d8a5b9fc742696d 100644 (file)
@@ -488,7 +488,12 @@ static struct fuse_conn *new_conn(struct super_block *sb)
                err = bdi_init(&fc->bdi);
                if (err)
                        goto error_kfree;
-               err = bdi_register_dev(&fc->bdi, fc->dev);
+               if (sb->s_bdev) {
+                       err = bdi_register(&fc->bdi, NULL, "%u:%u-fuseblk",
+                                          MAJOR(fc->dev), MINOR(fc->dev));
+               } else {
+                       err = bdi_register_dev(&fc->bdi, fc->dev);
+               }
                if (err)
                        goto error_bdi_destroy;
                /*
@@ -586,7 +591,7 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
                fc->bdi.ra_pages = min(fc->bdi.ra_pages, ra_pages);
                fc->minor = arg->minor;
                fc->max_write = arg->minor < 5 ? 4096 : arg->max_write;
-               fc->max_write = min_t(unsigned, 4096, fc->max_write);
+               fc->max_write = max_t(unsigned, 4096, fc->max_write);
                fc->conn_init = 1;
        }
        fuse_put_request(fc, req);
@@ -662,7 +667,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
        fc->flags = d.flags;
        fc->user_id = d.user_id;
        fc->group_id = d.group_id;
-       fc->max_read = min_t(unsigned, 4096, d.max_read);
+       fc->max_read = max_t(unsigned, 4096, d.max_read);
 
        /* Used by get_root_inode() */
        sb->s_fs_info = fc;