diff options
author | Wang Shilong <wangsl.fnst@cn.fujitsu.com> | 2014-07-17 07:44:12 +0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2020-04-28 21:02:21 +0300 |
commit | 1e404ae2039471ae9ee38f2181d8316c9307b5eb (patch) | |
tree | 625530baa5418e67e4d64b7773df5a21bfacb0a5 /fs | |
parent | 6a293f46d3eaafcbc4a3316f2ac80de9b1398415 (diff) | |
download | linux-1e404ae2039471ae9ee38f2181d8316c9307b5eb.tar.xz |
Btrfs: fix wrong max inline data size limit
commit c01a5c074c0f6f85a3b02e39432b9e5576ab51de upstream.
inline data is stored from offset of @disk_bytenr in
struct btrfs_file_extent_item. So substracting total
size of struct btrfs_file_extent_item is wrong, fix it.
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ctree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 796f1d2374ff..52f24459b9ee 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -394,7 +394,7 @@ struct btrfs_header { #define BTRFS_LEAF_DATA_SIZE(r) (__BTRFS_LEAF_DATA_SIZE(r->leafsize)) #define BTRFS_MAX_INLINE_DATA_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \ sizeof(struct btrfs_item) - \ - sizeof(struct btrfs_file_extent_item)) + offsetof(struct btrfs_file_extent_item, disk_bytenr)) #define BTRFS_MAX_XATTR_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \ sizeof(struct btrfs_item) -\ sizeof(struct btrfs_dir_item)) |