linux-stable/fs/btrfs
Qu Wenruo 3065976b04 btrfs: extent_io: Handle errors better in extent_write_full_page()
Since now flush_write_bio() could return error, kill the BUG_ON() first.
Then don't call flush_write_bio() unconditionally, instead we check the
return value from __extent_writepage() first.

If __extent_writepage() fails, we do cleanup, and return error without
submitting the possible corrupted or half-baked bio.

If __extent_writepage() successes, then we call flush_write_bio() and
return the result.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-04-29 19:02:23 +02:00
..
tests btrfs: Introduce extent_io_tree::owner to distinguish different io_trees 2019-04-29 19:02:18 +02:00
acl.c Btrfs: setup a nofs context for memory allocation at __btrfs_set_acl 2019-02-25 14:13:17 +01:00
async-thread.c btrfs: simplify workqueue name when allocating 2019-02-25 14:13:24 +01:00
async-thread.h
backref.c btrfs: honor path->skip_locking in backref code 2019-02-25 14:13:39 +01:00
backref.h
btrfs_inode.h Btrfs: fix fsync of files with multiple hard links in new directories 2018-12-17 14:51:43 +01:00
check-integrity.c btrfs: Fix typos in comments and strings 2018-12-17 14:51:50 +01:00
check-integrity.h
compression.c for-5.1/block-20190302 2019-03-08 14:12:17 -08:00
compression.h btrfs: change set_level() to bound the level passed in 2019-02-25 14:13:32 +01:00
ctree.c btrfs: Check the first key and level for cached extent buffer 2019-04-29 19:02:22 +02:00
ctree.h btrfs: Make btrfs_(set|clear)_header_flag return void 2019-04-29 19:02:22 +02:00
dedupe.h
delayed-inode.c Btrfs: kill btrfs_clear_path_blocking 2018-10-15 17:23:38 +02:00
delayed-inode.h Btrfs: delayed-inode: use rb_first_cached for ins_root and del_root 2018-10-15 17:23:33 +02:00
delayed-ref.c btrfs: qgroup: Move reserved data accounting from btrfs_delayed_ref_head to btrfs_qgroup_extent_record 2019-02-25 14:13:39 +01:00
delayed-ref.h btrfs: qgroup: Move reserved data accounting from btrfs_delayed_ref_head to btrfs_qgroup_extent_record 2019-02-25 14:13:39 +01:00
dev-replace.c btrfs: drop the lock on error in btrfs_dev_replace_cancel 2019-02-25 14:13:41 +01:00
dev-replace.h btrfs: dev-replace: open code trivial locking helpers 2018-12-17 14:51:45 +01:00
dir-item.c btrfs: Remove root parameter from btrfs_insert_dir_item 2018-10-15 17:23:25 +02:00
disk-io.c btrfs: Always output error message when key/level verification fails 2019-04-29 19:02:23 +02:00
disk-io.h btrfs: Check the first key and level for cached extent buffer 2019-04-29 19:02:22 +02:00
export.c btrfs: Remove 'objectid' member from struct btrfs_root 2018-10-15 17:23:25 +02:00
export.h
extent-tree.c Btrfs: remove no longer used 'sync' member from transaction handle 2019-04-29 19:02:18 +02:00
extent_io.c btrfs: extent_io: Handle errors better in extent_write_full_page() 2019-04-29 19:02:23 +02:00
extent_io.h btrfs: switch extent_buffer::lock_nested to bool 2019-04-29 19:02:21 +02:00
extent_map.c btrfs: Remove impossible condition from mergable_maps 2019-02-25 14:13:21 +01:00
extent_map.h btrfs: Remove impossible condition from mergable_maps 2019-02-25 14:13:21 +01:00
file-item.c btrfs: reduce kmap_atomic time for checksumming 2019-04-29 19:02:19 +02:00
file.c Btrfs: remove no longer used 'sync' member from transaction handle 2019-04-29 19:02:18 +02:00
free-space-cache.c Btrfs: fix deadlock on tree root leaf when finding free extent 2018-11-06 16:42:32 +01:00
free-space-cache.h
free-space-tree.c btrfs: use EXPORT_FOR_TESTS for conditionally exported functions 2018-12-17 14:51:37 +01:00
free-space-tree.h
inode-item.c
inode-map.c btrfs: prune unused includes 2018-08-06 13:12:43 +02:00
inode-map.h
inode.c btrfs: Introduce extent_io_tree::owner to distinguish different io_trees 2019-04-29 19:02:18 +02:00
ioctl.c btrfs: refactor btrfs_set_prop and add btrfs_set_prop_trans 2019-04-29 19:02:19 +02:00
Kconfig
locking.c btrfs: switch extent_buffer::lock_nested to bool 2019-04-29 19:02:21 +02:00
locking.h btrfs: merge btrfs_set_lock_blocking_rw with it's caller 2019-02-25 14:13:28 +01:00
lzo.c btrfs: change set_level() to bound the level passed in 2019-02-25 14:13:32 +01:00
Makefile
math.h
ordered-data.c btrfs: Switch memory allocations in async csum calculation path to kvmalloc 2019-04-25 14:17:38 +02:00
ordered-data.h btrfs: switch BTRFS_ORDERED_* to enums 2018-12-17 14:51:43 +01:00
orphan.c
print-tree.c btrfs: annotate unlikely branches after V0 extent type removal 2018-08-06 13:12:41 +02:00
print-tree.h
props.c btrfs: refactor btrfs_set_prop and add btrfs_set_prop_trans 2019-04-29 19:02:19 +02:00
props.h btrfs: refactor btrfs_set_prop and add btrfs_set_prop_trans 2019-04-29 19:02:19 +02:00
qgroup.c btrfs: Fix bound checking in qgroup_trace_new_subtree_blocks 2019-03-19 14:12:31 +01:00
qgroup.h btrfs: qgroup: Move reserved data accounting from btrfs_delayed_ref_head to btrfs_qgroup_extent_record 2019-02-25 14:13:39 +01:00
raid56.c for-5.1-rc2-tag 2019-03-26 10:32:13 -07:00
raid56.h
rcu-string.h
reada.c btrfs: dev-replace: open code trivial locking helpers 2018-12-17 14:51:45 +01:00
ref-verify.c btrfs: replace btrfs_set_lock_blocking_rw with appropriate helpers 2019-02-25 14:13:27 +01:00
ref-verify.h
relocation.c btrfs: reloc: Fix NULL pointer dereference due to expanded reloc_root lifespan 2019-04-29 19:02:22 +02:00
root-tree.c btrfs: Don't panic when we can't find a root key 2019-04-29 19:02:17 +02:00
scrub.c btrfs: scrub: return EAGAIN when fs is closing 2019-04-29 19:02:17 +02:00
send.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
send.h
struct-funcs.c btrfs: prune unused includes 2018-08-06 13:12:43 +02:00
super.c btrfs: add zstd compression level support 2019-02-25 14:13:33 +01:00
sysfs.c btrfs: Add sysfs support for metadata_uuid feature 2018-12-17 14:51:37 +01:00
sysfs.h btrfs: drop extra enum initialization where using defaults 2018-12-17 14:51:43 +01:00
transaction.c btrfs: Introduce extent_io_tree::owner to distinguish different io_trees 2019-04-29 19:02:18 +02:00
transaction.h Btrfs: remove no longer used 'sync' member from transaction handle 2019-04-29 19:02:18 +02:00
tree-checker.c btrfs: Fix typos in comments and strings 2018-12-17 14:51:50 +01:00
tree-checker.h
tree-defrag.c btrfs: open code now trivial btrfs_set_lock_blocking 2019-02-25 14:13:27 +01:00
tree-log.c Btrfs: fix assertion failure on fsync with NO_HOLES enabled 2019-03-20 19:53:39 +01:00
tree-log.h Btrfs: remove no longer used io_err from btrfs_log_ctx 2018-12-17 14:51:31 +01:00
ulist.c
ulist.h
uuid-tree.c btrfs: Turn an 'else if' into an 'else' in btrfs_uuid_tree_add 2019-04-29 19:02:19 +02:00
volumes.c btrfs: don't report readahead errors and don't update statistics 2019-03-13 17:14:27 +01:00
volumes.h btrfs: introduce new ioctl to unregister a btrfs device 2019-02-25 14:13:30 +01:00
xattr.c btrfs: refactor btrfs_set_prop and add btrfs_set_prop_trans 2019-04-29 19:02:19 +02:00
xattr.h
zlib.c btrfs: change set_level() to bound the level passed in 2019-02-25 14:13:32 +01:00
zstd.c btrfs: zstd: remove indirect calls for local functions 2019-04-29 19:02:18 +02:00