Skip to content

Commit

Permalink
Btrfs: fix compiler warning in file.c
Browse files Browse the repository at this point in the history
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: Tsutomu Itoh <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
Tsutomu Itoh authored and chrismason-xx committed Apr 5, 2011
1 parent d9d0487 commit c914923
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 @@ -906,7 +906,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
unsigned 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 /
Expand Down

0 comments on commit c914923

Please sign in to comment.