]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: btrfs_wait_tree_block_writeback can be void return
authorJeff Layton <jlayton@redhat.com>
Thu, 25 May 2017 10:39:52 +0000 (06:39 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2017 16:26:01 +0000 (18:26 +0200)
commitfbd22400befda90a0e6d7136ca0fb54265e81e69
tree3a54d9e4db65217606a47189b0c11ced8094e8d1
parent269c6c7f05276ca52b2a1451812185449c6963b9
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>
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h