aboutsummaryrefslogtreecommitdiff
path: root/fs/char_dev.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2010-09-21 11:49:01 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-26 17:21:26 -0700
commit52a366e0f6b5d2190055dc1ae39a3b421c1f21e2 (patch)
treecd6abb81ab71c82231b8f6190831a65446c5dbcc /fs/char_dev.c
parent702c0563a79cb487988dfc83a4e9089435baf8e3 (diff)
char: Mark /dev/zero and /dev/kmem as not capable of writeback
commit 371d217ee1ff8b418b8f73fb2a34990f951ec2d4 upstream. These devices don't do any writeback but their device inodes still can get dirty so mark bdi appropriately so that bdi code does the right thing and files inodes to lists of bdi carrying the device inodes. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <jaxboe@fusionio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/char_dev.c')
-rw-r--r--fs/char_dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/char_dev.c b/fs/char_dev.c
index d6db933df2b..be7613ebb66 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -39,7 +39,9 @@ struct backing_dev_info directly_mappable_cdev_bdi = {
#endif
/* permit direct mmap, for read, write or exec */
BDI_CAP_MAP_DIRECT |
- BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP),
+ BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP |
+ /* no writeback happens */
+ BDI_CAP_NO_ACCT_AND_WRITEBACK),
};
static struct kobj_map *cdev_map;