Hello,
  The length of memset in btrfs_file_write is wrong.

--

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 5070810..e67f8d4 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)

-- 
Regards,
Zhu Yanhai
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to