diff options
| author | Josef Bacik <josef@toxicpanda.com> | 2021-05-19 10:52:46 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-10 13:24:07 +0200 |
| commit | adaafc32d8b0d896c71348775eee3d0fbe743052 (patch) | |
| tree | 2e48eaad0cc4b695c345b3b5a370dc3fd111f562 | |
| parent | 8299bb94fae9393c922251ff90508f0a8b058ff4 (diff) | |
| download | linux-adaafc32d8b0d896c71348775eee3d0fbe743052.tar.gz linux-adaafc32d8b0d896c71348775eee3d0fbe743052.tar.bz2 linux-adaafc32d8b0d896c71348775eee3d0fbe743052.zip | |
btrfs: return errors from btrfs_del_csums in cleanup_ref_head
commit 856bd270dc4db209c779ce1e9555c7641ffbc88e upstream.
We are unconditionally returning 0 in cleanup_ref_head, despite the fact
that btrfs_del_csums could fail. We need to return the error so the
transaction gets aborted properly, fix this by returning ret from
btrfs_del_csums in cleanup_ref_head.
Reviewed-by: Qu Wenruo <wqu@suse.com>
CC: stable@vger.kernel.org # 4.19+
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index ce5e0f6c6af4..014f956be66a 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2501,7 +2501,7 @@ static int cleanup_ref_head(struct btrfs_trans_handle *trans, head->qgroup_reserved); btrfs_delayed_ref_unlock(head); btrfs_put_delayed_ref_head(head); - return 0; + return ret; } /* |
