summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChandan Rajendra <chandan@linux.vnet.ibm.com>2016-01-21 15:56:01 +0530
committerDavid Sterba <dsterba@suse.com>2016-02-01 19:24:29 +0100
commit0c29ba993e4b08771deb20f8717a4b57cc7e678b (patch)
tree78f0190cfc726cfc63c154f2b64945147bcfd71c /fs/btrfs/inode.c
parent5f4dc8fc835bbb902f5c2aa3de3978f3f518aa73 (diff)
downloadop-kernel-dev-0c29ba993e4b08771deb20f8717a4b57cc7e678b.zip
op-kernel-dev-0c29ba993e4b08771deb20f8717a4b57cc7e678b.tar.gz
Btrfs: Limit inline extents to root->sectorsize
cow_file_range_inline() limits the size of an inline extent to PAGE_CACHE_SIZE. This breaks in subpagesize-blocksize scenarios. Fix this by comparing against root->sectorsize. Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 9dd4fb4..7cda820 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -263,7 +263,7 @@ static noinline int cow_file_range_inline(struct btrfs_root *root,
data_len = compressed_size;
if (start > 0 ||
- actual_end > PAGE_CACHE_SIZE ||
+ actual_end > root->sectorsize ||
data_len > BTRFS_MAX_INLINE_DATA_SIZE(root) ||
(!compressed_size &&
(actual_end & (root->sectorsize - 1)) == 0) ||
OpenPOWER on IntegriCloud