From: Jan Kara <jack@suse.cz>
To: Jeff Layton <jlayton@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v2 11/92] shmem: convert to simple_rename_timestamp
Date: Thu, 6 Jul 2023 12:33:37 +0200 [thread overview]
Message-ID: <20230706103337.phdkyo6yylua6pdf@quack3> (raw)
In-Reply-To: <20230705190309.579783-9-jlayton@kernel.org>
On Wed 05-07-23 15:00:36, 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 to me. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> mm/shmem.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 0f45e72a5ca7..1693134959c5 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -3306,9 +3306,7 @@ static int shmem_rename2(struct mnt_idmap *idmap,
>
> old_dir->i_size -= BOGO_DIRENT_SIZE;
> new_dir->i_size += BOGO_DIRENT_SIZE;
> - old_dir->i_ctime = old_dir->i_mtime =
> - new_dir->i_ctime = new_dir->i_mtime =
> - inode->i_ctime = current_time(old_dir);
> + simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry);
> inode_inc_iversion(old_dir);
> inode_inc_iversion(new_dir);
> return 0;
> --
> 2.41.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2023-07-06 10:33 UTC|newest]
Thread overview: 8+ 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 ` Jeff Layton
2023-07-06 10:33 ` Jan Kara [this message]
2023-07-05 19:00 ` [PATCH v2 25/92] fs: convert to ctime accessor functions Jeff Layton
2023-07-05 19:01 ` [PATCH v2 52/92] hugetlbfs: " Jeff Layton
2023-07-05 19:58 ` Mike Kravetz
2023-07-06 12:40 ` Jan Kara
2023-07-05 19:01 ` [PATCH v2 87/92] shmem: " Jeff Layton
2023-07-06 14:56 ` 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=20230706103337.phdkyo6yylua6pdf@quack3 \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=hughd@google.com \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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