Commit 9aead435 authored by yanhai zhu's avatar yanhai zhu Committed by Chris Mason

Btrfs: Fix memset length in btrfs_file_write

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 52c26179
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment