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]
Date:   Thu, 6 Jul 2023 23:12:37 +0800
From:   Gao Xiang <hsiangkao@...ux.alibaba.com>
To:     Jan Kara <jack@...e.cz>, 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>,
        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

Hi Jan,

On 2023/7/6 19:00, 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@...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);

I'm fine with this.  I think we could use this (although I'm not sure
if checkpatch will complain but personally I'm fine.)

Thanks,
Gao Xiang

> 
> ?
> 
> 								Honza

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ