summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-09-22 09:12:37 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-22 09:12:37 -0700
commitb68e9d4581cbb211be3e174d3445b4917aacbcf6 (patch)
treec7ea337b623abacdb546d30a39037dd029f20a34 /drivers
parent62f1b494d82272819570d715eb6633887a9fde20 (diff)
parent692ebd17c2905313fff3c504c249c6a0faad16ec (diff)
downloadlinux-3.10-b68e9d4581cbb211be3e174d3445b4917aacbcf6.tar.gz
linux-3.10-b68e9d4581cbb211be3e174d3445b4917aacbcf6.tar.bz2
linux-3.10-b68e9d4581cbb211be3e174d3445b4917aacbcf6.zip
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: bdi: Fix warnings in __mark_inode_dirty for /dev/zero and friends char: Mark /dev/zero and /dev/kmem as not capable of writeback bdi: Initialize noop_backing_dev_info properly cfq-iosched: fix a kernel OOPs when usb key is inserted block: fix blk_rq_map_kern bio direction flag cciss: freeing uninitialized data on error path
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/char/mem.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 6124c2fd2d3..5e4fadcdece 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -4792,7 +4792,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
clean4:
kfree(h->cmd_pool_bits);
/* Free up sg elements */
- for (k = 0; k < h->nr_cmds; k++)
+ for (k-- ; k >= 0; k--)
kfree(h->scatter_list[k]);
kfree(h->scatter_list);
cciss_free_sg_chain_blocks(h->cmd_sg_list, h->nr_cmds);
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 = {