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>
This commit is contained in:

committed by
Jens Axboe

parent
823423ef55
commit
f56753ac2a
@@ -414,7 +414,7 @@ int __filemap_fdatawrite_range(struct address_space *mapping, loff_t start,
|
||||
.range_end = end,
|
||||
};
|
||||
|
||||
if (!mapping_cap_writeback_dirty(mapping) ||
|
||||
if (!mapping_can_writeback(mapping) ||
|
||||
!mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
|
||||
return 0;
|
||||
|
||||
@@ -1702,7 +1702,7 @@ repeat:
|
||||
no_page:
|
||||
if (!page && (fgp_flags & FGP_CREAT)) {
|
||||
int err;
|
||||
if ((fgp_flags & FGP_WRITE) && mapping_cap_account_dirty(mapping))
|
||||
if ((fgp_flags & FGP_WRITE) && mapping_can_writeback(mapping))
|
||||
gfp_mask |= __GFP_WRITE;
|
||||
if (fgp_flags & FGP_NOFS)
|
||||
gfp_mask &= ~__GFP_FS;
|
||||
|
Reference in New Issue
Block a user