Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Jan Kara <jack@suse.cz>
Cc: Christian Brauner <brauner@kernel.org>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Yue Hu <huyue2@coolpad.com>, Al Viro <viro@zeniv.linux.org.uk>,
	linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH v2 39/92] erofs: convert to ctime accessor functions
Date: Thu, 06 Jul 2023 07:53:01 -0400	[thread overview]
Message-ID: <b1cc6c70a42bf41d023eea9f11ff0aaea10a56c3.camel@kernel.org> (raw)
In-Reply-To: <20230706110007.dc4tpyt5e6wxi5pt@quack3>

On Thu, 2023-07-06 at 13:00 +0200, Jan Kara wrote:
> On Wed 05-07-23 15:01:04, Jeff Layton wrote:
> > In later patches, we're going to change how the inode's ctime field is
> > used. Switch to using accessor functions instead of raw accesses of
> > inode->i_ctime.
> > 
> > Acked-by: Gao Xiang <xiang@kernel.org>
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> 
> Just one nit below:
> 
> > @@ -176,10 +175,10 @@ static void *erofs_read_inode(struct erofs_buf *buf,
> >  		vi->chunkbits = sb->s_blocksize_bits +
> >  			(vi->chunkformat & EROFS_CHUNK_FORMAT_BLKBITS_MASK);
> >  	}
> > -	inode->i_mtime.tv_sec = inode->i_ctime.tv_sec;
> > -	inode->i_atime.tv_sec = inode->i_ctime.tv_sec;
> > -	inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec;
> > -	inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec;
> > +	inode->i_mtime.tv_sec = inode_get_ctime(inode).tv_sec;
> > +	inode->i_atime.tv_sec = inode_get_ctime(inode).tv_sec;
> > +	inode->i_mtime.tv_nsec = inode_get_ctime(inode).tv_nsec;
> > +	inode->i_atime.tv_nsec = inode_get_ctime(inode).tv_nsec;
> 
> Isn't this just longer way to write:
> 
> 	inode->i_atime = inode->i_mtime = inode_get_ctime(inode);
> 
> ?
> 
> 								Honza

Yes. Chalk that one up to coccinelle. Fixed in my tree.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2023-07-06 11:53 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:01   ` [PATCH v2 39/92] erofs: convert to ctime accessor functions Jeff Layton
2023-07-06 11:00     ` Jan Kara
2023-07-06 11:53       ` Jeff Layton [this message]
2023-07-06 15:12       ` Gao Xiang

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=b1cc6c70a42bf41d023eea9f11ff0aaea10a56c3.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=brauner@kernel.org \
    --cc=huyue2@coolpad.com \
    --cc=jack@suse.cz \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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