* [PATCH -next] ext4: correct the error handle in ext4_fallocate()
@ 2025-03-19 2:35 Zhang Yi
2025-03-19 7:30 ` Baokun Li
2025-03-22 3:36 ` Theodore Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: Zhang Yi @ 2025-03-19 2:35 UTC (permalink / raw)
To: linux-ext4
Cc: linux-fsdevel, linux-kernel, tytso, adilger.kernel, jack,
yi.zhang, yi.zhang, libaokun1, yukuai3, yangerkun
From: Zhang Yi <yi.zhang@huawei.com>
The error out label of file_modified() should be out_inode_lock in
ext4_fallocate().
Fixes: 2890e5e0f49e ("ext4: move out common parts into ext4_fallocate()")
Reported-by: Baokun Li <libaokun1@huawei.com>
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
---
fs/ext4/extents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 1b028be19193..dcc49df190ed 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4744,7 +4744,7 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
ret = file_modified(file);
if (ret)
- return ret;
+ goto out_inode_lock;
if ((mode & FALLOC_FL_MODE_MASK) == FALLOC_FL_ALLOCATE_RANGE) {
ret = ext4_do_fallocate(file, offset, len, mode);
--
2.46.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] ext4: correct the error handle in ext4_fallocate()
2025-03-19 2:35 [PATCH -next] ext4: correct the error handle in ext4_fallocate() Zhang Yi
@ 2025-03-19 7:30 ` Baokun Li
2025-03-22 3:36 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Baokun Li @ 2025-03-19 7:30 UTC (permalink / raw)
To: Zhang Yi, linux-ext4
Cc: linux-fsdevel, linux-kernel, tytso, adilger.kernel, jack,
yi.zhang, yukuai3, yangerkun
On 2025/3/19 10:35, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@huawei.com>
>
> The error out label of file_modified() should be out_inode_lock in
> ext4_fallocate().
>
> Fixes: 2890e5e0f49e ("ext4: move out common parts into ext4_fallocate()")
> Reported-by: Baokun Li <libaokun1@huawei.com>
> Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
> ---
Looks good. Feel free to add:
Reviewed-by: Baokun Li <libaokun1@huawei.com>
> fs/ext4/extents.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 1b028be19193..dcc49df190ed 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4744,7 +4744,7 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
>
> ret = file_modified(file);
> if (ret)
> - return ret;
> + goto out_inode_lock;
>
> if ((mode & FALLOC_FL_MODE_MASK) == FALLOC_FL_ALLOCATE_RANGE) {
> ret = ext4_do_fallocate(file, offset, len, mode);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] ext4: correct the error handle in ext4_fallocate()
2025-03-19 2:35 [PATCH -next] ext4: correct the error handle in ext4_fallocate() Zhang Yi
2025-03-19 7:30 ` Baokun Li
@ 2025-03-22 3:36 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2025-03-22 3:36 UTC (permalink / raw)
To: linux-ext4, Zhang Yi
Cc: Theodore Ts'o, linux-fsdevel, linux-kernel, adilger.kernel,
jack, yi.zhang, libaokun1, yukuai3, yangerkun
On Wed, 19 Mar 2025 10:35:57 +0800, Zhang Yi wrote:
> The error out label of file_modified() should be out_inode_lock in
> ext4_fallocate().
>
>
Applied, thanks!
[1/1] ext4: correct the error handle in ext4_fallocate()
commit: 129245cfbd6d79c6d603f357f428010ccc0f0ee7
Best regards,
--
Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-22 3:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-19 2:35 [PATCH -next] ext4: correct the error handle in ext4_fallocate() Zhang Yi
2025-03-19 7:30 ` Baokun Li
2025-03-22 3:36 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®