diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-24 08:51:40 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-09-24 13:43:39 -0600 |
commit | f56753ac2a90810726334df04d735e9f8f5a32d9 (patch) | |
tree | 80c7e4178e880cc0c5fa35d4c7974dc77584e61b /mm/backing-dev.c | |
parent | 823423ef55f4d9c470b1edc9c5b5c93d06abfaae (diff) | |
download | linux-f56753ac2a90810726334df04d735e9f8f5a32d9.tar.gz linux-f56753ac2a90810726334df04d735e9f8f5a32d9.tar.bz2 linux-f56753ac2a90810726334df04d735e9f8f5a32d9.zip |
bdi: replace BDI_CAP_NO_{WRITEBACK,ACCT_DIRTY} with a single flag
Replace the two negative flags that are always used together with a
single positive flag that indicates the writeback capability instead
of two related non-capabilities. Also remove the pointless wrappers
to just check the flag.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index df18f0088dd3..408d5051d05b 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -14,9 +14,7 @@ #include <linux/device.h> #include <trace/events/writeback.h> -struct backing_dev_info noop_backing_dev_info = { - .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, -}; +struct backing_dev_info noop_backing_dev_info; EXPORT_SYMBOL_GPL(noop_backing_dev_info); static struct class *bdi_class; @@ -745,7 +743,7 @@ struct backing_dev_info *bdi_alloc(int node_id) kfree(bdi); return NULL; } - bdi->capabilities = BDI_CAP_WRITEBACK_ACCT; + bdi->capabilities = BDI_CAP_WRITEBACK | BDI_CAP_WRITEBACK_ACCT; bdi->ra_pages = VM_READAHEAD_PAGES; bdi->io_pages = VM_READAHEAD_PAGES; return bdi; |