summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-26 08:41:54 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-26 08:41:54 -0700
commit84bfed40fc25dd052620398fdcc19d8c77f02270 (patch)
treee0a8c7df159edfdc745b91de2c8158f939c31e03 /fs/btrfs/inode.c
parent6f0d349d922ba44e4348a17a78ea51b7135965b1 (diff)
parentc5b4a50b74018b3677098151ec5f4fce07d5e6a0 (diff)
downloadlinux-stable-84bfed40fc25dd052620398fdcc19d8c77f02270.tar.gz
linux-stable-84bfed40fc25dd052620398fdcc19d8c77f02270.tar.bz2
linux-stable-84bfed40fc25dd052620398fdcc19d8c77f02270.zip
Merge tag 'for-4.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba: "Two regression fixes and an incorrect error value propagation fix from 'rename exchange'" * tag 'for-4.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix return value on rename exchange failure btrfs: fix invalid-free in btrfs_extent_same Btrfs: fix physical offset reported by fiemap for inline extents
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index e9482f0db9d0..be98dfc8d0f8 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -9443,6 +9443,7 @@ static int btrfs_rename_exchange(struct inode *old_dir,
u64 new_idx = 0;
u64 root_objectid;
int ret;
+ int ret2;
bool root_log_pinned = false;
bool dest_log_pinned = false;
@@ -9639,7 +9640,8 @@ out_fail:
dest_log_pinned = false;
}
}
- ret = btrfs_end_transaction(trans);
+ ret2 = btrfs_end_transaction(trans);
+ ret = ret ? ret : ret2;
out_notrans:
if (new_ino == BTRFS_FIRST_FREE_OBJECTID)
up_read(&fs_info->subvol_sem);