diff options
author | Jan Kara <jack@suse.cz> | 2017-04-12 06:24:41 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-04-20 14:09:55 -0400 |
commit | 7fbbe972c3ec63a3391997e0cef09964f9236088 (patch) | |
tree | b8fb8cfc193a1f11b78a22c6e5d8c7fa9ba2d4f2 /fs/fuse | |
parent | 5f7f7543f52eee03ed35c9d671fbb1cdbd4bc9b5 (diff) |
fuse: Get rid of bdi_initialized
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>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dev.c | 5 | ||||
-rw-r--r-- | fs/fuse/fuse_i.h | 3 | ||||
-rw-r--r-- | fs/fuse/inode.c | 2 |
3 files changed, 2 insertions, 8 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 78887f68ee6a..c2d7f3a92679 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -382,7 +382,7 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req) | |||
382 | wake_up(&fc->blocked_waitq); | 382 | wake_up(&fc->blocked_waitq); |
383 | 383 | ||
384 | if (fc->num_background == fc->congestion_threshold && | 384 | if (fc->num_background == fc->congestion_threshold && |
385 | fc->connected && fc->bdi_initialized) { | 385 | fc->connected && fc->sb) { |
386 | clear_bdi_congested(fc->sb->s_bdi, BLK_RW_SYNC); | 386 | clear_bdi_congested(fc->sb->s_bdi, BLK_RW_SYNC); |
387 | clear_bdi_congested(fc->sb->s_bdi, BLK_RW_ASYNC); | 387 | clear_bdi_congested(fc->sb->s_bdi, BLK_RW_ASYNC); |
388 | } | 388 | } |
@@ -573,8 +573,7 @@ void fuse_request_send_background_locked(struct fuse_conn *fc, | |||
573 | fc->num_background++; | 573 | fc->num_background++; |
574 | if (fc->num_background == fc->max_background) | 574 | if (fc->num_background == fc->max_background) |
575 | fc->blocked = 1; | 575 | fc->blocked = 1; |
576 | if (fc->num_background == fc->congestion_threshold && | 576 | if (fc->num_background == fc->congestion_threshold && fc->sb) { |
577 | fc->bdi_initialized) { | ||
578 | set_bdi_congested(fc->sb->s_bdi, BLK_RW_SYNC); | 577 | set_bdi_congested(fc->sb->s_bdi, BLK_RW_SYNC); |
579 | set_bdi_congested(fc->sb->s_bdi, BLK_RW_ASYNC); | 578 | set_bdi_congested(fc->sb->s_bdi, BLK_RW_ASYNC); |
580 | } | 579 | } |
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 0e7c79a390e0..f33341d9501a 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h | |||
@@ -527,9 +527,6 @@ struct fuse_conn { | |||
527 | /** Filesystem supports NFS exporting. Only set in INIT */ | 527 | /** Filesystem supports NFS exporting. Only set in INIT */ |
528 | unsigned export_support:1; | 528 | unsigned export_support:1; |
529 | 529 | ||
530 | /** Set if bdi is valid */ | ||
531 | unsigned bdi_initialized:1; | ||
532 | |||
533 | /** write-back cache policy (default is write-through) */ | 530 | /** write-back cache policy (default is write-through) */ |
534 | unsigned writeback_cache:1; | 531 | unsigned writeback_cache:1; |
535 | 532 | ||
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 90bacbc87fb3..73cf05135252 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -983,8 +983,6 @@ static int fuse_bdi_init(struct fuse_conn *fc, struct super_block *sb) | |||
983 | /* fuse does it's own writeback accounting */ | 983 | /* fuse does it's own writeback accounting */ |
984 | sb->s_bdi->capabilities = BDI_CAP_NO_ACCT_WB | BDI_CAP_STRICTLIMIT; | 984 | sb->s_bdi->capabilities = BDI_CAP_NO_ACCT_WB | BDI_CAP_STRICTLIMIT; |
985 | 985 | ||
986 | fc->bdi_initialized = 1; | ||
987 | |||
988 | /* | 986 | /* |
989 | * For a single fuse filesystem use max 1% of dirty + | 987 | * For a single fuse filesystem use max 1% of dirty + |
990 | * writeback threshold. | 988 | * writeback threshold. |