mirror of https://gitee.com/openkylin/linux.git
for-4.18-rc1-tag
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAlsvtAIACgkQxWXV+ddt WDvPJQ//eEr+ACNxG5n42e63TaNpLOeoGAsUChwekP6DAIc2n/r78SHX+T/woDqd 7/dc2eqlYF5Fmn6MPQ1ufL2xlfw0t3OnemK8T5+4sxZDdzeAH9V+kHaqoaLUPExL 4r6lK5Ywwa2cWghC7WvQg3+bWLX18OEExG63SlEhLo3YJM5uUqVhGVPi6ARrbxNM GJvXcQsxjXLqukm4gYvHC6Zra9Awv65uiAU+VCm2y96j1fEJ0yjK/pC1RtoFGCqS 48Jjuzfq/V3nxy0Wjr3DvpQVEQcKyGha6i/eazZISdRhGSjrYdvIwpUn7gZeoo2Q hT8VVergLbVYgIeaOwgwubQzNaG2C/ZTsEjPQrNrA7a/AGsh5C/ommYE9MSyS6L0 PG0NLUNDXFmEj8WdI97So+1Sm2OCb04DPbPhHbbkhw5L/MPE1TaLN5aUWguj8laB NnyPRdVP9jCJAI0OhJY7nPDmsPKe2jogVVsRheTcob+V5G+vIgzDXlGfsW/88Seg dHubMaC0nz6u8Cj4dIviitiLXuustyz0JkVdljTLawWWJ/Hs7NlsSf3Q3nj2Kvia e8QMID0vLphQyL1hqC0n7M0g2ohq9NUGT1nhLTPSpFl0l8bIA9PQehOx9Q5vx8yp tJF+d0qiNfgvadA+KhyvQ8puQb2+zZQ8+Pqfjwd4ySD7SI5dcA4= =fCdm -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
84bfed40fc
|
@ -4542,8 +4542,11 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
|
|||
offset_in_extent = em_start - em->start;
|
||||
em_end = extent_map_end(em);
|
||||
em_len = em_end - em_start;
|
||||
disko = em->block_start + offset_in_extent;
|
||||
flags = 0;
|
||||
if (em->block_start < EXTENT_MAP_LAST_BYTE)
|
||||
disko = em->block_start + offset_in_extent;
|
||||
else
|
||||
disko = 0;
|
||||
|
||||
/*
|
||||
* bump off for our next call to get_extent
|
||||
|
|
|
@ -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 @@ static int btrfs_rename_exchange(struct inode *old_dir,
|
|||
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);
|
||||
|
|
|
@ -3577,7 +3577,7 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
|
|||
ret = btrfs_extent_same_range(src, loff, BTRFS_MAX_DEDUPE_LEN,
|
||||
dst, dst_loff, &cmp);
|
||||
if (ret)
|
||||
goto out_unlock;
|
||||
goto out_free;
|
||||
|
||||
loff += BTRFS_MAX_DEDUPE_LEN;
|
||||
dst_loff += BTRFS_MAX_DEDUPE_LEN;
|
||||
|
@ -3587,16 +3587,16 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
|
|||
ret = btrfs_extent_same_range(src, loff, tail_len, dst,
|
||||
dst_loff, &cmp);
|
||||
|
||||
out_free:
|
||||
kvfree(cmp.src_pages);
|
||||
kvfree(cmp.dst_pages);
|
||||
|
||||
out_unlock:
|
||||
if (same_inode)
|
||||
inode_unlock(src);
|
||||
else
|
||||
btrfs_double_inode_unlock(src, dst);
|
||||
|
||||
out_free:
|
||||
kvfree(cmp.src_pages);
|
||||
kvfree(cmp.dst_pages);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue