diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2011-03-29 20:57:23 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-04-05 01:19:41 -0400 |
commit | c9149235a42ab93914434fff45c44b45023363f3 (patch) | |
tree | 827035f0710a01bf35c5c365387f650addfe647f /fs | |
parent | d9d04879321af570ea7285c6dad92d9c3cd108a1 (diff) |
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: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 656bc0a892b1..e621ea54a3fd 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -906,7 +906,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, | |||
906 | unsigned long last_index; | 906 | unsigned long last_index; |
907 | size_t num_written = 0; | 907 | size_t num_written = 0; |
908 | int nrptrs; | 908 | int nrptrs; |
909 | int ret; | 909 | int ret = 0; |
910 | 910 | ||
911 | nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) / | 911 | nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) / |
912 | PAGE_CACHE_SIZE, PAGE_CACHE_SIZE / | 912 | PAGE_CACHE_SIZE, PAGE_CACHE_SIZE / |