]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fuse: Get rid of bdi_initialized
authorJan Kara <jack@suse.cz>
Wed, 12 Apr 2017 10:24:41 +0000 (12:24 +0200)
committerJens Axboe <axboe@fb.com>
Thu, 20 Apr 2017 18:09:55 +0000 (12:09 -0600)
It is not needed anymore since bdi is initialized whenever superblock
exists.

CC: Miklos Szeredi <miklos@szeredi.hu>
CC: linux-fsdevel@vger.kernel.org
Suggested-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/fuse/dev.c
fs/fuse/fuse_i.h
fs/fuse/inode.c

index 78887f68ee6a6ecd22d42afb4df0d2b2251fb22f..c2d7f3a92679dd371af2a5fe9f9c2dfe1e0f39b2 100644 (file)
@@ -382,7 +382,7 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req)
                        wake_up(&fc->blocked_waitq);
 
                if (fc->num_background == fc->congestion_threshold &&
-                   fc->connected && fc->bdi_initialized) {
+                   fc->connected && fc->sb) {
                        clear_bdi_congested(fc->sb->s_bdi, BLK_RW_SYNC);
                        clear_bdi_congested(fc->sb->s_bdi, BLK_RW_ASYNC);
                }
@@ -573,8 +573,7 @@ void fuse_request_send_background_locked(struct fuse_conn *fc,
        fc->num_background++;
        if (fc->num_background == fc->max_background)
                fc->blocked = 1;
-       if (fc->num_background == fc->congestion_threshold &&
-           fc->bdi_initialized) {
+       if (fc->num_background == fc->congestion_threshold && fc->sb) {
                set_bdi_congested(fc->sb->s_bdi, BLK_RW_SYNC);
                set_bdi_congested(fc->sb->s_bdi, BLK_RW_ASYNC);
        }
index 0e7c79a390e0ae6f8c53e8b466857f121843723b..f33341d9501a02079d1da148add1a23642c68a81 100644 (file)
@@ -527,9 +527,6 @@ struct fuse_conn {
        /** Filesystem supports NFS exporting.  Only set in INIT */
        unsigned export_support:1;
 
-       /** Set if bdi is valid */
-       unsigned bdi_initialized:1;
-
        /** write-back cache policy (default is write-through) */
        unsigned writeback_cache:1;
 
index 90bacbc87fb3a43c9bcbd0718c6d10b36e5d1bd9..73cf051352521ad400af30befd3afbd2fc595c31 100644 (file)
@@ -983,8 +983,6 @@ static int fuse_bdi_init(struct fuse_conn *fc, struct super_block *sb)
        /* fuse does it's own writeback accounting */
        sb->s_bdi->capabilities = BDI_CAP_NO_ACCT_WB | BDI_CAP_STRICTLIMIT;
 
-       fc->bdi_initialized = 1;
-
        /*
         * For a single fuse filesystem use max 1% of dirty +
         * writeback threshold.