From: yanhai zhu Date: Mon, 5 Jan 2009 20:49:11 +0000 (-0500) Subject: Btrfs: Fix memset length in btrfs_file_write X-Git-Tag: v2.6.29-rc1~27^2~9^2~8 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9aead43588f4bdb1bb61e348ad0f33794bbddc0f;p=linux-2.6-omap-h63xx.git Btrfs: Fix memset length in btrfs_file_write Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 507081059d9..5908521922f 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1094,7 +1094,7 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf, PAGE_CACHE_SHIFT; WARN_ON(num_pages > nrptrs); - memset(pages, 0, sizeof(pages)); + memset(pages, 0, sizeof(struct page *) * nrptrs); ret = btrfs_check_free_space(root, write_bytes, 0); if (ret)