Skip to content

Commit

Permalink
Btrfs: Fix memset length in btrfs_file_write
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
jesuszhu authored and chrismason-xx committed Jan 5, 2009
1 parent 52c2617 commit 9aead43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9aead43

Please sign in to comment.