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: <20230706105345.cdoadx7hvb227vts@quack3>
Date:   Thu, 6 Jul 2023 12:53:45 +0200
From:   Jan Kara <jack@...e.cz>
To:     Jeff Layton <jlayton@...nel.org>
Cc:     Christian Brauner <brauner@...nel.org>,
        Xiubo Li <xiubli@...hat.com>,
        Ilya Dryomov <idryomov@...il.com>,
        Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        ceph-devel@...r.kernel.org
Subject: Re: [PATCH v2 30/92] ceph: convert to ctime accessor functions

On Wed 05-07-23 15:00:55, 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.
> 
> Reviewed-by: Xiubo Li <xiubli@...hat.com>
> Signed-off-by: Jeff Layton <jlayton@...nel.org>

Just one nit below:

> @@ -688,6 +688,7 @@ void ceph_fill_file_time(struct inode *inode, int issued,
>  			 struct timespec64 *mtime, struct timespec64 *atime)
>  {
>  	struct ceph_inode_info *ci = ceph_inode(inode);
> +	struct timespec64 ictime = inode_get_ctime(inode);
>  	int warn = 0;
>  
>  	if (issued & (CEPH_CAP_FILE_EXCL|
> @@ -696,11 +697,12 @@ void ceph_fill_file_time(struct inode *inode, int issued,
>  		      CEPH_CAP_AUTH_EXCL|
>  		      CEPH_CAP_XATTR_EXCL)) {
>  		if (ci->i_version == 0 ||
> -		    timespec64_compare(ctime, &inode->i_ctime) > 0) {
> +		    timespec64_compare(ctime, &ictime) > 0) {
>  			dout("ctime %lld.%09ld -> %lld.%09ld inc w/ cap\n",
> -			     inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec,
> +			     inode_get_ctime(inode).tv_sec,
> +			     inode_get_ctime(inode).tv_nsec,

I think here you can use ictime instead of inode_get_ctime(inode).
Otherwise feel free to add:

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



								Honza

-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ