diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-22 10:39:38 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-22 10:39:38 +0100 |
commit | 71f28d7e89bdd96f671959180ab78f9cce287927 (patch) | |
tree | 61379d90c1b89cdf60def60951289f2724494259 /fs/ext4/ext_common.h | |
parent | 34d4be79d78569e6800c6fc59bfeb8b7c0ea2f5b (diff) | |
parent | 129e3317a6b283cb7bb10eb8cb0f531b603893c0 (diff) | |
download | barebox-71f28d7e89bdd96f671959180ab78f9cce287927.tar.gz barebox-71f28d7e89bdd96f671959180ab78f9cce287927.tar.xz |
Merge branch 'for-next/ext4'
Diffstat (limited to 'fs/ext4/ext_common.h')
-rw-r--r-- | fs/ext4/ext_common.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/ext4/ext_common.h b/fs/ext4/ext_common.h index a28f591bc4..37575d2a1a 100644 --- a/fs/ext4/ext_common.h +++ b/fs/ext4/ext_common.h @@ -232,5 +232,13 @@ struct ext2_data { struct ext4fs_indir_block indir1, indir2, indir3; }; -extern unsigned long part_offset; +static inline loff_t ext4_isize(struct ext2fs_node *node) +{ + if (S_ISREG(le16_to_cpu(node->inode.mode))) + return ((loff_t)le32_to_cpu(node->inode.size_high) << 32) | + le32_to_cpu(node->inode.size); + + return (loff_t) le32_to_cpu(node->inode.size); +} + #endif |