[PATCH 1/5] ext4: inline: remove extra size check when writing data
From: Thadeu Lima de Souza Cascardo
Date: Fri Dec 06 2024 - 12:29:10 EST
ext4_prepare_inline_data which is called right after the removed check has
the same check. This avoids extra calls to ext4_get_inode_loc and having to
traverse all xattrs in the inode twice for that check.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxx>
---
fs/ext4/inline.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 401a224f0956..0611a050668b 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -668,9 +668,6 @@ int ext4_try_to_write_inline_data(struct address_space *mapping,
struct folio *folio;
struct ext4_iloc iloc;
- if (pos + len > ext4_get_max_inline_size(inode))
- goto convert;
-
ret = ext4_get_inode_loc(inode, &iloc);
if (ret)
return ret;
--
2.34.1