diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-05-18 15:33:29 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-19 18:25:59 +0200 |
commit | 3c91ee6964114b1a4f54ae6b397c889576d91cf4 (patch) | |
tree | 61be313a053c6a962fb6b28eb2216613336e327d /fs/btrfs/extent_io.h | |
parent | Btrfs: unify naming of btrfs_io_bio (diff) | |
download | linux-3c91ee6964114b1a4f54ae6b397c889576d91cf4.tar.xz linux-3c91ee6964114b1a4f54ae6b397c889576d91cf4.zip |
Btrfs: work around maybe-uninitialized warning
A rewrite of btrfs_submit_direct_hook appears to have introduced a warning:
fs/btrfs/inode.c: In function 'btrfs_submit_direct_hook':
fs/btrfs/inode.c:8467:14: error: 'bio' may be used uninitialized in this function [-Werror=maybe-uninitialized]
Where the 'bio' variable was previously initialized unconditionally, it
is now set in the "while (submit_len > 0)" loop that would never execute
if submit_len is zero.
Assuming this cannot happen in practice, we can avoid the warning
by simply replacing the while{} loop with a do{}while() loop so
the compiler knows that it will always be entered at least once.
Fixes changes introduced in "Btrfs: use bio_clone_bioset_partial to
simplify DIO submit".
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
0 files changed, 0 insertions, 0 deletions