aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
authorHarshad Shirwadkar <harshadshirwadkar@gmail.com>2021-10-15 11:25:13 -0700
committerTheodore Ts'o <tytso@mit.edu>2021-11-04 10:34:39 -0400
commit1ebf21784b19d5bc269f39a5d1eedb7f29a7d152 (patch)
treee40e09433596daca12c0d13632d584fc55b31b7e /fs/ext4/extents.c
parent6c31a689b2e9e1dee5cbe16b773648a2d84dfb02 (diff)
downloadlinux-1ebf21784b19d5bc269f39a5d1eedb7f29a7d152.tar.gz
ext4: inline data inode fast commit replay fixes
Since there are no blocks in an inline data inode, there's no point in fixing iblocks field in fast commit replay path for this inode. Similarly, there's no point in fixing any block bitmaps / global block counters with respect to such an inode. Just bail out from these functions if an inline data inode is encountered. Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com> Link: https://lore.kernel.org/r/20211015182513.395917-2-harshads@google.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 09f56e04f4b24..0ecf819bf1891 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -6071,6 +6071,9 @@ int ext4_ext_clear_bb(struct inode *inode)
int j, ret = 0;
struct ext4_map_blocks map;
+ if (ext4_test_inode_flag(inode, EXT4_INODE_INLINE_DATA))
+ return 0;
+
/* Determin the size of the file first */
path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL,
EXT4_EX_NOCACHE);