提交 c9149235 编写于 作者: T Tsutomu Itoh 提交者: Chris Mason

Btrfs: fix compiler warning in file.c

While compiling Btrfs, I got following messages:

  CC [M]  fs/btrfs/file.o
fs/btrfs/file.c: In function '__btrfs_buffered_write':
fs/btrfs/file.c:909: warning: 'ret' may be used uninitialized in this function
  CC [M]  fs/btrfs/tree-defrag.o

This patch fixes compiler warning.
Signed-off-by: NTsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 d9d04879
...@@ -906,7 +906,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, ...@@ -906,7 +906,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
unsigned long last_index; unsigned long last_index;
size_t num_written = 0; size_t num_written = 0;
int nrptrs; int nrptrs;
int ret; int ret = 0;
nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) / nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) /
PAGE_CACHE_SIZE, PAGE_CACHE_SIZE / PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册