lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230706110007.dc4tpyt5e6wxi5pt@quack3>
Date:   Thu, 6 Jul 2023 13:00:07 +0200
From:   Jan Kara <jack@...e.cz>
To:     Jeff Layton <jlayton@...nel.org>
Cc:     Christian Brauner <brauner@...nel.org>,
        Gao Xiang <xiang@...nel.org>, Chao Yu <chao@...nel.org>,
        Yue Hu <huyue2@...lpad.com>,
        Jeffle Xu <jefflexu@...ux.alibaba.com>,
        Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-erofs@...ts.ozlabs.org
Subject: Re: [PATCH v2 39/92] erofs: convert to ctime accessor functions

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@...nel.org>
> Signed-off-by: Jeff Layton <jlayton@...nel.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
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ