summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2010-09-21 11:49:01 +0200
committerJens Axboe <jaxboe@fusionio.com>2010-09-22 09:48:47 +0200
commit371d217ee1ff8b418b8f73fb2a34990f951ec2d4 (patch)
tree74d5e95a0aa85b8a8b94621b247a78eb527ce609 /drivers/char
parent976e48f8a5b02fc33f3e5cad87fb3fcea041a49c (diff)
downloadlinux-3.10-371d217ee1ff8b418b8f73fb2a34990f951ec2d4.tar.gz
linux-3.10-371d217ee1ff8b418b8f73fb2a34990f951ec2d4.tar.bz2
linux-3.10-371d217ee1ff8b418b8f73fb2a34990f951ec2d4.zip
char: Mark /dev/zero and /dev/kmem as not capable of writeback
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. Cc: stable@kernel.org Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/mem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index a398ecdbd75..1f528fad351 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -788,10 +788,11 @@ static const struct file_operations zero_fops = {
/*
* capabilities for /dev/zero
* - permits private mappings, "copies" are taken of the source of zeros
+ * - no writeback happens
*/
static struct backing_dev_info zero_bdi = {
.name = "char/mem",
- .capabilities = BDI_CAP_MAP_COPY,
+ .capabilities = BDI_CAP_MAP_COPY | BDI_CAP_NO_ACCT_AND_WRITEBACK,
};
static const struct file_operations full_fops = {