linux-stable/fs/btrfs
Goldwyn Rodrigues ad929b7bfb btrfs: mark compressed range uptodate only if all bio succeed
[ Upstream commit 240246f6b9 ]

In compression write endio sequence, the range which the compressed_bio
writes is marked as uptodate if the last bio of the compressed (sub)bios
is completed successfully. There could be previous bio which may
have failed which is recorded in cb->errors.

Set the writeback range as uptodate only if cb->errors is zero, as opposed
to checking only the last bio's status.

Backporting notes: in all versions up to 4.4 the last argument is always
replaced by "!cb->errors".

CC: stable@vger.kernel.org # 4.4+
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-08-08 08:54:28 +02:00
..
tests Btrfs: fix selftests failure due to uninitialized i_mode in test inodes 2020-08-05 10:06:00 +02:00
acl.c Btrfs: setup a nofs context for memory allocation at __btrfs_set_acl 2019-03-23 20:10:00 +01:00
async-thread.c Btrfs: fix crash during unmount due to race with delayed inode workers 2020-04-17 10:48:49 +02:00
async-thread.h Btrfs: fix crash during unmount due to race with delayed inode workers 2020-04-17 10:48:49 +02:00
backref.c btrfs: fix double free on ulist after backref resolution failure 2020-07-29 10:16:47 +02:00
backref.h
btrfs_inode.h btrfs: use tagged writepage to mitigate livelock of snapshot 2019-02-12 19:47:11 +01:00
check-integrity.c btrfs: fix possible NULL-pointer dereference in integrity checks 2020-02-24 08:34:49 +01:00
check-integrity.h
compression.c btrfs: mark compressed range uptodate only if all bio succeed 2021-08-08 08:54:28 +02:00
compression.h btrfs: correctly validate compression type 2019-09-16 08:22:19 +02:00
ctree.c btrfs: fix race when picking most recent mod log operation for an old root 2021-05-22 10:59:19 +02:00
ctree.h btrfs: tree-checker: Verify inode item 2020-11-10 12:35:56 +01:00
dedupe.h
delayed-inode.c btrfs: abort transaction if we fail to update the delayed inode 2021-07-20 16:15:45 +02:00
delayed-inode.h
delayed-ref.c Btrfs: fix race between adding and putting tree mod seq elements and nodes 2020-02-11 04:34:06 -08:00
delayed-ref.h
dev-replace.c btrfs: dev-replace: fail mount if we don't have replace item with target device 2020-11-18 19:18:48 +01:00
dev-replace.h
dir-item.c
disk-io.c btrfs: fix space cache memory leak after transaction abort 2020-09-03 11:24:26 +02:00
disk-io.h btrfs: Check the first key and level for cached extent buffer 2019-05-22 07:37:42 +02:00
export.c btrfs: export helpers for subvolume name/id resolution 2020-08-26 10:30:58 +02:00
export.h btrfs: export helpers for subvolume name/id resolution 2020-08-26 10:30:58 +02:00
extent-tree.c btrfs: fix unmountable seed device after fstrim 2021-06-10 13:24:08 +02:00
extent_io.c Btrfs: fix missing error return if writeback for extent buffer never started 2020-11-18 19:18:43 +01:00
extent_io.h btrfs: fix potential deadlock in the search ioctl 2020-09-09 19:04:29 +02:00
extent_map.c Btrfs: fix race between using extent maps and merging them 2020-02-19 19:51:56 +01:00
extent_map.h
file-item.c btrfs: fix error handling in btrfs_del_csums 2021-06-10 13:24:07 +02:00
file.c btrfs: return value from btrfs_mark_extent_written() in case of error 2021-06-16 11:54:59 +02:00
free-space-cache.c btrfs: clarify error returns values in __load_free_space_cache 2021-03-04 09:39:41 +01:00
free-space-cache.h
free-space-tree.c
free-space-tree.h
inode-item.c
inode-map.c Btrfs: fix inode cache waiters hanging on path allocation failure 2020-01-27 14:51:12 +01:00
inode-map.h
inode.c btrfs: compression: don't try to compress if we don't have enough pages 2021-07-28 11:13:52 +02:00
ioctl.c btrfs: fix metadata extent leak after failure to create subvolume 2021-05-22 10:59:14 +02:00
Kconfig btrfs: disable build on platforms having page size 256K 2021-07-20 16:15:45 +02:00
locking.c
locking.h
lzo.c
Makefile
math.h
ordered-data.c Btrfs: fix btrfs_wait_ordered_range() so that it waits for all ordered extents 2020-02-28 16:38:58 +01:00
ordered-data.h
orphan.c
print-tree.c btrfs: require only sector size alignment for parent eb bytenr 2020-09-17 13:45:28 +02:00
print-tree.h
props.c btrfs: correctly validate compression type 2019-09-16 08:22:19 +02:00
props.h
qgroup.c btrfs: fix transaction leak and crash after RO remount caused by qgroup rescan 2021-01-19 18:22:36 +01:00
qgroup.h btrfs: qgroup: Avoid calling qgroup functions if qgroup is not enabled 2018-11-13 11:08:56 -08:00
raid56.c btrfs: fix raid6 qstripe kmap 2021-03-11 14:04:59 +01:00
raid56.h
rcu-string.h
reada.c btrfs: fix use-after-free on readahead extent after failure to create it 2020-11-05 11:08:48 +01:00
ref-verify.c btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod 2020-11-18 19:18:48 +01:00
ref-verify.h
relocation.c btrfs: convert logic BUG_ON()'s in replace_path to ASSERT()'s 2021-05-22 10:59:16 +02:00
root-tree.c btrfs: do not delete mismatched root refs 2020-01-23 08:21:31 +01:00
scrub.c btrfs: merge btrfs_find_device and find_device 2020-06-22 09:04:59 +02:00
send.c btrfs: send: fix invalid path for unlink operations after parent orphanization 2021-07-20 16:15:40 +02:00
send.h
struct-funcs.c
super.c btrfs: fix transaction leak and crash after RO remount caused by qgroup rescan 2021-01-19 18:22:36 +01:00
sysfs.c btrfs: sysfs: use NOFS for device creation 2020-08-26 10:30:59 +02:00
sysfs.h
transaction.c btrfs: clear defrag status of a root if starting transaction fails 2021-07-20 16:15:40 +02:00
transaction.h Btrfs: fix deadlock between fiemap and transaction commits 2019-08-25 10:47:54 +02:00
tree-checker.c btrfs: tree-checker: fix the error message for transid error 2020-11-10 12:35:57 +01:00
tree-checker.h btrfs: Move btrfs_check_chunk_valid() to tree-check.[ch] and export it 2020-11-10 12:35:56 +01:00
tree-defrag.c
tree-log.c btrfs: clear log tree recovering status if starting transaction fails 2021-07-20 16:15:48 +02:00
tree-log.h Btrfs: sync log after logging new name 2018-08-23 17:37:26 +02:00
ulist.c
ulist.h
uuid-tree.c btrfs: handle ENOENT in btrfs_uuid_tree_iterate 2019-12-31 16:34:44 +01:00
volumes.c btrfs: fix rw device counting in __btrfs_free_extra_devids 2021-08-04 12:23:44 +02:00
volumes.h btrfs: tree-checker: Verify dev item 2020-11-10 12:35:56 +01:00
xattr.c Btrfs: use nofs context when initializing security xattrs to avoid deadlock 2019-01-16 22:04:37 +01:00
xattr.h
zlib.c
zstd.c