diff options
author | Ritesh Harjani <riteshh@linux.ibm.com> | 2021-05-30 17:54:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-16 12:53:02 +0300 |
commit | 97f56d0b433bf7861d11749fc6bcc409b0a91217 (patch) | |
tree | 3123ae090e25a3dacbb33bdd5f3d28e46cbd01c0 /fs/btrfs | |
parent | 8d9d475bb17e7b9ce0690de6a71d6c0b7785db34 (diff) | |
download | linux-97f56d0b433bf7861d11749fc6bcc409b0a91217.tar.xz |
btrfs: return value from btrfs_mark_extent_written() in case of error
commit e7b2ec3d3d4ebeb4cff7ae45cf430182fa6a49fb upstream.
We always return 0 even in case of an error in btrfs_mark_extent_written().
Fix it to return proper error value in case of a failure. All callers
handle it.
CC: stable@vger.kernel.org # 4.4+
Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 725544ec9c84..dd2504322a87 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1100,7 +1100,7 @@ int btrfs_mark_extent_written(struct btrfs_trans_handle *trans, int del_nr = 0; int del_slot = 0; int recow; - int ret; + int ret = 0; u64 ino = btrfs_ino(inode); path = btrfs_alloc_path(); @@ -1320,7 +1320,7 @@ again: } out: btrfs_free_path(path); - return 0; + return ret; } /* |