diff options
author | Jeff Layton <jlayton@redhat.com> | 2017-05-25 06:39:52 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-19 18:26:01 +0200 |
commit | 3189ff778630d9ce8a9f2fda9f8ae4510cceb154 (patch) | |
tree | 3a54d9e4db65217606a47189b0c11ced8094e8d1 /fs/btrfs/disk-io.c | |
parent | 118c701e20ad6edfb35fd83ec6989991714b1d89 (diff) | |
download | linux-stable-3189ff778630d9ce8a9f2fda9f8ae4510cceb154.tar.gz linux-stable-3189ff778630d9ce8a9f2fda9f8ae4510cceb154.tar.bz2 linux-stable-3189ff778630d9ce8a9f2fda9f8ae4510cceb154.zip |
btrfs: btrfs_wait_tree_block_writeback can be void return
Nothing checks its return value.
Is it safe to skip checking return value of btrfs_wait_tree_block_writeback?
Liu Bo: I think yes, it's used in walk_log_tree which is called in two
places, free_log_tree and log replay. For free_log_tree, it waits for
any running writeback of the extent buffer under freeing to finish in
case we need to access the eb pointer from page->private, and it's OK to
not check the return value, while for log replay, it's doesn't wait
because wc->wait is not set. So neither cares about the writeback error.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
[ added more explanation to changelog, from Liu Bo ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index bfeb5c12e3ff..cdc28ad7f1ed 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1223,10 +1223,10 @@ int btrfs_write_tree_block(struct extent_buffer *buf) buf->start + buf->len - 1); } -int btrfs_wait_tree_block_writeback(struct extent_buffer *buf) +void btrfs_wait_tree_block_writeback(struct extent_buffer *buf) { - return filemap_fdatawait_range(buf->pages[0]->mapping, - buf->start, buf->start + buf->len - 1); + filemap_fdatawait_range(buf->pages[0]->mapping, + buf->start, buf->start + buf->len - 1); } struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr, |