From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org,
syzbot+a91fcdbd2698f99db8f4@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] Revert "fs/ntfs3: Replace inode_trylock with inode_lock"
Date: Wed, 9 Jul 2025 15:16:07 +0100 [thread overview]
Message-ID: <8dcd40e6-5cf3-4886-b91c-e693b38a2d17@lucifer.local> (raw)
In-Reply-To: <20250708075709.5688-1-almaz.alexandrovich@paragon-software.com>
On Tue, Jul 08, 2025 at 09:57:09AM +0200, Konstantin Komarov wrote:
> This reverts commit 69505fe98f198ee813898cbcaf6770949636430b.
>
> Initially, conditional lock acquisition was removed to fix an xfstest bug
> that was observed during internal testing. The deadlock reported by syzbot
> is resolved by reintroducing conditional acquisition. The xfstest bug no
> longer occurs on kernel version 6.16-rc1 during internal testing. I
> assume that changes in other modules may have contributed to this.
Great to have additional info about xfstest there.
>
> Fixes: 69505fe98f19 ("fs/ntfs3: Replace inode_trylock with inode_lock")
> Reported-by: syzbot+a91fcdbd2698f99db8f4@syzkaller.appspotmail.com
Thanks for swapping out the reported-by!
> Suggested-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
LGTM so:
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> ---
> fs/ntfs3/file.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
> index 65fb27d1e17c..2e321b84a1ed 100644
> --- a/fs/ntfs3/file.c
> +++ b/fs/ntfs3/file.c
> @@ -322,7 +322,10 @@ static int ntfs_file_mmap(struct file *file, struct vm_area_struct *vma)
> }
>
> if (ni->i_valid < to) {
> - inode_lock(inode);
> + if (!inode_trylock(inode)) {
> + err = -EAGAIN;
> + goto out;
> + }
> err = ntfs_extend_initialized_size(file, ni,
> ni->i_valid, to);
> inode_unlock(inode);
> --
> 2.43.0
>
prev parent reply other threads:[~2025-07-09 14:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 12:47 [PATCH] " Konstantin Komarov
2025-07-07 13:00 ` Christoph Hellwig
2025-07-07 13:44 ` Lorenzo Stoakes
2025-07-08 7:57 ` [PATCH v2] " Konstantin Komarov
2025-07-09 14:16 ` Lorenzo Stoakes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8dcd40e6-5cf3-4886-b91c-e693b38a2d17@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
--cc=syzbot+a91fcdbd2698f99db8f4@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®