public inbox for ntfs3@lists.linux.dev
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Jeff Layton <jlayton@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
	Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
	Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	ntfs3@lists.linux.dev
Subject: Re: [PATCH v2 13/92] ntfs3: convert to simple_rename_timestamp
Date: Thu, 6 Jul 2023 12:40:25 +0200	[thread overview]
Message-ID: <20230706104025.gm66visyl3cer7vs@quack3> (raw)
In-Reply-To: <20230705190309.579783-11-jlayton@kernel.org>

On Wed 05-07-23 15:00:38, Jeff Layton wrote:
> A rename potentially involves updating 4 different inode timestamps.
> Convert to the new simple_rename_timestamp helper function.
> 
> Signed-off-by: Jeff Layton <jlayton@kernel.org>

Looks good. Feel free to add:

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

								Honza

> ---
>  fs/ntfs3/namei.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c
> index 70f8c859e0ad..bfd986699f9e 100644
> --- a/fs/ntfs3/namei.c
> +++ b/fs/ntfs3/namei.c
> @@ -324,14 +324,11 @@ static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir,
>  		/* Restore after failed rename failed too. */
>  		_ntfs_bad_inode(inode);
>  	} else if (!err) {
> -		inode->i_ctime = dir->i_ctime = dir->i_mtime =
> -			current_time(dir);
> +		simple_rename_timestamp(dir, dentry, new_dir, new_dentry);
>  		mark_inode_dirty(inode);
>  		mark_inode_dirty(dir);
> -		if (dir != new_dir) {
> -			new_dir->i_mtime = new_dir->i_ctime = dir->i_ctime;
> +		if (dir != new_dir)
>  			mark_inode_dirty(new_dir);
> -		}
>  
>  		if (IS_DIRSYNC(dir))
>  			ntfs_sync_inode(dir);
> -- 
> 2.41.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2023-07-06 10:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230705185755.579053-1-jlayton@kernel.org>
     [not found] ` <20230705190309.579783-1-jlayton@kernel.org>
2023-07-05 19:00   ` [PATCH v2 13/92] ntfs3: convert to simple_rename_timestamp Jeff Layton
2023-07-06 10:40     ` Jan Kara [this message]
2023-07-05 19:01   ` [PATCH v2 61/92] ntfs3: convert to ctime accessor functions Jeff Layton
2023-07-06 13:47     ` Jan Kara

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=20230706104025.gm66visyl3cer7vs@quack3 \
    --to=jack@suse.cz \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=brauner@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    --cc=viro@zeniv.linux.org.uk \
    /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