public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
	Jan Kara <jack@suse.cz>, Jens Axboe <jaxboe@fusionio.com>
Subject: [27/68] char: Mark /dev/zero and /dev/kmem as not capable of writeback
Date: Fri, 24 Sep 2010 09:31:51 -0700	[thread overview]
Message-ID: <20100924163346.447354449@clark.site> (raw)
In-Reply-To: <20100924163357.GA15741@kroah.com>

2.6.32-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Jan Kara <jack@suse.cz>

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>

---
 drivers/char/mem.c |    3 ++-
 fs/char_dev.c      |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -822,10 +822,11 @@ static const struct file_operations zero
 /*
  * 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 = {
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -39,7 +39,9 @@ struct backing_dev_info directly_mappabl
 #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;



  parent reply	other threads:[~2010-09-24 16:44 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24 16:33 [00/68] 2.6.32.23 stable review Greg KH
2010-09-24 16:31 ` [01/68] USB: serial/mos*: prevent reading uninitialized stack memory Greg KH
2010-09-24 16:31 ` [02/68] sparc: Provide io{read,write}{16,32}be() Greg KH
2010-09-24 16:31 ` [03/68] gro: fix different skb headrooms Greg KH
2010-09-24 16:31 ` [04/68] gro: Re-fix " Greg KH
2010-09-24 16:31 ` [05/68] irda: Correctly clean up self->ias_obj on irda_bind() failure Greg KH
2010-09-24 16:31 ` [06/68] tcp: select(writefds) dont hang up when a peer close connection Greg KH
2010-09-24 16:31 ` [07/68] tcp: Combat per-cpu skew in orphan tests Greg KH
2010-09-24 16:31 ` [08/68] tcp: fix three tcp sysctls tuning Greg KH
2010-09-24 16:31 ` [09/68] bridge: Clear IPCB before possible entry into IP stack Greg KH
2010-09-24 16:31 ` [10/68] bridge: Clear INET control block of SKBs passed into ip_fragment() Greg KH
2010-09-24 16:31 ` [11/68] net: Fix oops from tcp_collapse() when using splice() Greg KH
2010-09-24 16:31 ` [12/68] rds: fix a leak of kernel memory Greg KH
2010-10-01  0:50   ` David Miller
2010-09-24 16:31 ` [13/68] tcp: Prevent overzealous packetization by SWS logic Greg KH
2010-09-24 16:31 ` [14/68] UNIX: Do not loop forever at unix_autobind() Greg KH
2010-09-24 16:31 ` [15/68] r8169: fix random mdio_write failures Greg KH
2010-09-24 16:31 ` [16/68] r8169: fix mdio_read and update mdio_write according to hw specs Greg KH
2010-09-24 16:31 ` [17/68] sparc64: Get rid of indirect p1275 PROM call buffer Greg KH
2010-09-24 16:31 ` [18/68] drivers/net/usb/hso.c: prevent reading uninitialized memory Greg KH
2010-09-24 16:31 ` [19/68] drivers/net/cxgb3/cxgb3_main.c: prevent reading uninitialized stack memory Greg KH
2010-09-24 16:31 ` [20/68] drivers/net/eql.c: " Greg KH
2010-09-24 16:31 ` [21/68] bonding: correctly process non-linear skbs Greg KH
2010-09-24 16:31 ` [22/68] Staging: vt6655: fix buffer overflow Greg KH
2010-09-24 16:31 ` [23/68] net/llc: make opt unsigned in llc_ui_setsockopt() Greg KH
2010-09-24 16:31 ` [24/68] pid: make setpgid() system call use RCU read-side critical section Greg KH
2010-09-24 16:31 ` [25/68] sched: Fix user time incorrectly accounted as system time on 32-bit Greg KH
2010-09-24 16:31 ` [26/68] oprofile: Add Support for Intel CPU Family 6 / Model 22 (Intel Celeron 540) Greg KH
2010-09-24 16:31 ` Greg KH [this message]
2010-09-24 16:31 ` [28/68] drivers/pci/intel-iommu.c: fix build with older gccs Greg KH
2010-09-24 16:31 ` [29/68] drivers/video/sis/sis_main.c: prevent reading uninitialized stack memory Greg KH
2010-09-24 16:31 ` [30/68] percpu: fix pcpu_last_unit_cpu Greg KH
2010-09-24 16:31 ` [31/68] aio: check for multiplication overflow in do_io_submit Greg KH
2010-09-24 16:31 ` [32/68] inotify: send IN_UNMOUNT events Greg KH
2010-09-24 16:31 ` [33/68] SCSI: mptsas: fix hangs caused by ATA pass-through Greg KH
2010-09-24 16:31 ` [34/68] ext4: Fix remaining racy updates of EXT4_I(inode)->i_flags Greg KH
2010-09-24 16:31 ` [35/68] IA64: fix siglock Greg KH
2010-09-24 16:32 ` [36/68] IA64: Optimize ticket spinlocks in fsys_rt_sigprocmask Greg KH
2010-09-24 16:32 ` [37/68] KEYS: Fix RCU no-lock warning in keyctl_session_to_parent() Greg KH
2010-09-24 16:32 ` [38/68] KEYS: Fix bug in keyctl_session_to_parent() if parent has no session keyring Greg KH
2010-09-24 16:32 ` [39/68] xfs: prevent reading uninitialized stack memory Greg KH
2010-09-24 16:32 ` [40/68] drivers/video/via/ioctl.c: " Greg KH
2010-09-24 16:32 ` [41/68] ACPI: disable _OSI(Windows 2009) on Asus K50IJ Greg KH
2010-09-24 16:32 ` [42/68] bnx2: Fix netpoll crash Greg KH
2010-09-24 16:32 ` [43/68] bnx2: Fix hang during rmmod bnx2 Greg KH
2010-09-24 16:32 ` [44/68] AT91: change dma resource index Greg KH
2010-09-24 16:32 ` [45/68] cxgb3: fix hot plug removal crash Greg KH
2010-09-24 16:32 ` [46/68] mm: page allocator: drain per-cpu lists after direct reclaim allocation fails Greg KH
2010-09-24 16:32 ` [47/68] mm: page allocator: calculate a better estimate of NR_FREE_PAGES when memory is low and kswapd is awake Greg KH
2010-09-24 16:32 ` [48/68] mm: page allocator: update free page counters after pages are placed on the free list Greg KH
2010-09-24 16:32 ` [49/68] guard page for stacks that grow upwards Greg KH
2010-09-24 16:32 ` [50/68] Fix unprotected access to task credentials in waitid() Greg KH
2010-09-24 16:32 ` [51/68] sctp: Do not reset the packet during sctp_packet_config() Greg KH
2010-09-24 16:32 ` [52/68] 3c503: Fix IRQ probing Greg KH
2010-09-24 16:32 ` [53/68] asix: fix setting mac address for AX88772 Greg KH
2010-09-24 16:32 ` [54/68] [S390] dasd: use correct label location for diag fba disks Greg KH
2010-09-24 16:32 ` [55/68] [PATCH] clocksource: sh_tmu: compute mult and shift before registration Greg KH
2010-09-24 16:32 ` [56/68] gro: Fix bogus gso_size on the first fraglist entry Greg KH
2010-09-24 16:32 ` [57/68] hostap_pci: set dev->base_addr during probe Greg KH
2010-09-24 16:32 ` [58/68] [PATCH] inotify: fix inotify oneshot support Greg KH
2010-09-24 16:32 ` [59/68] Input: add compat support for sysfs and /proc capabilities output Greg KH
2010-09-24 16:32 ` [60/68] MIPS: Quit using undefined behavior of ADDU in 64-bit atomic operations Greg KH
2010-09-24 16:32 ` [61/68] MIPS: Set io_map_base for several PCI bridges lacking it Greg KH
2010-09-24 16:32 ` [62/68] [PATCH] MIPS: uasm: Add OR instruction Greg KH
2010-09-24 16:32 ` [63/68] pata_pdc202xx_old: fix UDMA mode for Promise UDMA33 cards Greg KH
2010-09-24 16:32 ` [64/68] [PATCH] pata_pdc202xx_old: fix UDMA mode for PDC2026x chipsets Greg KH
2010-09-24 16:32 ` [65/68] MIPS: Sibyte: Fix M3 TLB exception handler workaround Greg KH
2010-09-24 16:32 ` [66/68] sis-agp: Remove SIS 760, handled by amd64-agp Greg KH
2010-09-24 16:32 ` [67/68] alpha: Fix printk format errors Greg KH
2010-09-24 16:32 ` [68/68] x86: Add memory modify constraints to xchg() and cmpxchg() Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100924163346.447354449@clark.site \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jack@suse.cz \
    --cc=jaxboe@fusionio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable-review@kernel.org \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox