cow_file_range_inline() used different condition for plain and
compressed data.
For compressed data, it's allowed to have inline extent equal to sectorsize,
while for plain data, it's not allowed to have inline extent equal to
sectorsize.
But since we limit BTRFS_MAX_INLINE_DATA_SIZE() to (sectorsize - 1),
there is no such difference any long, just remove the extra check.
Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
---
fs/btrfs/inode.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 0f7041e10c67..8c5e69bdbfb5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -299,8 +299,6 @@ static noinline int cow_file_range_inline(struct btrfs_root *root,
if (start > 0 ||
actual_end > fs_info->sectorsize ||
- (!compressed_size &&
- (actual_end & (fs_info->sectorsize - 1)) == 0) ||
end + 1 < isize ||
data_len > fs_info->max_inline) {
return 1;
--
2.16.2
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html