From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: Baolin Liu <liubaolin12138@163.com>
Cc: <ntfs3@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
Baolin Liu <liubaolin@kylinos.cn>
Subject: Re: [PATCH] fs/ntfs3: update ctime only on successful setxattr
Date: Mon, 14 Sep 2026 09:35:53 +0200 [thread overview]
Message-ID: <b0d314d2-47a5-496a-a62c-8b90cfa0c413@paragon-software.com> (raw)
In-Reply-To: <20260626094914.908224-1-liubaolin12138@163.com>
On 6/26/26 11:49, Baolin Liu wrote:
> From: Baolin Liu <liubaolin@kylinos.cn>
>
> ntfs_setxattr() updates ctime and marks the inode dirty even when the
> xattr operation fails.
>
> Do that only on success.
>
> Fixes: 2d44667c306e ("fs/ntfs3: Update i_ctime when xattr is added")
> Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
> ---
> fs/ntfs3/xattr.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c
> index 9eeac0ab2b71..9743a63a152e 100644
> --- a/fs/ntfs3/xattr.c
> +++ b/fs/ntfs3/xattr.c
> @@ -960,8 +960,10 @@ static noinline int ntfs_setxattr(const struct xattr_handler *handler,
> NULL);
>
> out:
> - inode_set_ctime_current(inode);
> - mark_inode_dirty(inode);
> + if (!err) {
> + inode_set_ctime_current(inode);
> + mark_inode_dirty(inode);
> + }
>
> return err;
> }
Hello,
Sorry for the delay.
Your patch is applied, thanks.
Regards,
Konstantin
prev parent reply other threads:[~2026-09-14 7:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 9:49 Baolin Liu
2026-09-14 7:35 ` Konstantin Komarov [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=b0d314d2-47a5-496a-a62c-8b90cfa0c413@paragon-software.com \
--to=almaz.alexandrovich@paragon-software.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liubaolin12138@163.com \
--cc=liubaolin@kylinos.cn \
--cc=ntfs3@lists.linux.dev \
/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®