All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4:Update the pre-check in ext4_find_inline_data_nolock
@ 2026-09-10  3:26 shuo chen
  2026-09-10  3:36 ` sashiko-bot
  2026-09-10 10:26 ` Jan Kara
  0 siblings, 2 replies; 3+ messages in thread
From: shuo chen @ 2026-09-10  3:26 UTC (permalink / raw)
  To: tytso
  Cc: adilger.kernel, libaokun, jack, ojaswin, yi.zhang, linux-ext4,
	shuo chen

The pre-check in ext4_find_inline_data_nolock should be kept
consistent with that in ext4_xattr_ibody_find,so as to avoid
unnecessary operations.

Signed-off-by: shuo chen <1289151713@qq.com>
---
 fs/ext4/inline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index ceee69a66482..9f6a4d13b9ab 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -151,7 +151,7 @@ int ext4_find_inline_data_nolock(struct inode *inode)
 	};
 	int error;
 
-	if (EXT4_I(inode)->i_extra_isize == 0)
+	if (!EXT4_INODE_HAS_XATTR_SPACE(inode))
 		return 0;
 
 	error = ext4_get_inode_loc(inode, &is.iloc);
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ext4:Update the pre-check in ext4_find_inline_data_nolock
  2026-09-10  3:26 [PATCH] ext4:Update the pre-check in ext4_find_inline_data_nolock shuo chen
@ 2026-09-10  3:36 ` sashiko-bot
  2026-09-10 10:26 ` Jan Kara
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-09-10  3:36 UTC (permalink / raw)
  To: shuo chen; +Cc: tytso, linux-ext4

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces a build failure by using an undeclared macro `EXT4_INODE_HAS_XATTR_SPACE`, and contradicts its own commit message.
--

commit 32deefc7c2acb463248871b4f82791288c8d233b
Author: shuo chen <1289151713@qq.com>

ext4:Update the pre-check in ext4_find_inline_data_nolock

This commit attempts to update the pre-check in ext4_find_inline_data_nolock
to be consistent with ext4_xattr_ibody_find to avoid unnecessary operations.

> diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
> index caa51473207d7..19ce2a59c46a3 100644
> --- a/fs/ext4/inline.c
> +++ b/fs/ext4/inline.c
> @@ -132,7 +132,7 @@ int ext4_find_inline_data_nolock(struct inode *inode)
>  	};
>  	int error;
>  
> -	if (EXT4_I(inode)->i_extra_isize == 0)
> +	if (!EXT4_INODE_HAS_XATTR_SPACE(inode))

[Severity: Low]
Does this fail to compile because EXT4_INODE_HAS_XATTR_SPACE is not defined
anywhere in the kernel tree?

The commit message mentions keeping this check consistent with
ext4_xattr_ibody_find. However, looking at ext4_xattr_ibody_find, it appears
to still use the original check:

    if (EXT4_I(inode)->i_extra_isize == 0)
            return 0;

Was a prerequisite patch defining EXT4_INODE_HAS_XATTR_SPACE missed, or
should this remain as the original check?

>  		return 0;
>  
>  	error = ext4_get_inode_loc(inode, &is.iloc);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_0EDE840F0C8186D030DEAF5A95B8BE54350A@qq.com?part=1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ext4:Update the pre-check in ext4_find_inline_data_nolock
  2026-09-10  3:26 [PATCH] ext4:Update the pre-check in ext4_find_inline_data_nolock shuo chen
  2026-09-10  3:36 ` sashiko-bot
@ 2026-09-10 10:26 ` Jan Kara
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2026-09-10 10:26 UTC (permalink / raw)
  To: shuo chen
  Cc: tytso, adilger.kernel, libaokun, jack, ojaswin, yi.zhang,
	linux-ext4

On Thu 10-09-26 11:26:14, shuo chen wrote:
> The pre-check in ext4_find_inline_data_nolock should be kept
> consistent with that in ext4_xattr_ibody_find,so as to avoid
> unnecessary operations.
> 
> Signed-off-by: shuo chen <1289151713@qq.com>

Yeah, ok, it's a tiny improvement but it's a bit cleaner this way. Feel
free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/inline.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
> index ceee69a66482..9f6a4d13b9ab 100644
> --- a/fs/ext4/inline.c
> +++ b/fs/ext4/inline.c
> @@ -151,7 +151,7 @@ int ext4_find_inline_data_nolock(struct inode *inode)
>  	};
>  	int error;
>  
> -	if (EXT4_I(inode)->i_extra_isize == 0)
> +	if (!EXT4_INODE_HAS_XATTR_SPACE(inode))
>  		return 0;
>  
>  	error = ext4_get_inode_loc(inode, &is.iloc);
> -- 
> 2.55.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-10 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10  3:26 [PATCH] ext4:Update the pre-check in ext4_find_inline_data_nolock shuo chen
2026-09-10  3:36 ` sashiko-bot
2026-09-10 10:26 ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.