Btrfs: fix compiler warning in file.c
PATCH 1/1 Btrfs: fix compiler warning in file.c
While compiling Btrfs, I got following messages:
CC [M] fs/btrfs/file.ofs/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 Tsutomu Itoh <[email protected]>
--- fs/btrfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/file.c +1 -1
@@ -906,7 +906,7 @@ static noinline ssize_t __btrfs_bufferedunsigned long last_index;size_t num_written =0 ;int nrptrs; -int ret; +int ret =0 ; nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /