]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Btrfs: fix compiler warning in file.c
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>
Wed, 30 Mar 2011 00:57:23 +0000 (00:57 +0000)
committerChris Mason <chris.mason@oracle.com>
Tue, 5 Apr 2011 05:19:41 +0000 (01:19 -0400)
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>
fs/btrfs/file.c

index 656bc0a892b14c6b6a420cda879e3b3e1fc9acf7..e621ea54a3fd64bcf3dae29e4f96e887b6eff95c 100644 (file)
@@ -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 /