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: <813f36d3-2431-4266-bb2e-faa3fc2a8fd7@nvidia.com>
Date: Mon, 17 Nov 2025 06:59:25 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: Christoph Hellwig <hch@....de>, Christian Brauner <brauner@...nel.org>
CC: Al Viro <viro@...iv.linux.org.uk>, David Sterba <dsterba@...e.com>, Jan
 Kara <jack@...e.cz>, Mike Marshall <hubcap@...ibond.com>, Martin Brandenburg
	<martin@...ibond.com>, Carlos Maiolino <cem@...nel.org>, Stefan Roesch
	<shr@...com>, Jeff Layton <jlayton@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
	"gfs2@...ts.linux.dev" <gfs2@...ts.linux.dev>, "io-uring@...r.kernel.org"
	<io-uring@...r.kernel.org>, "devel@...ts.orangefs.org"
	<devel@...ts.orangefs.org>, "linux-unionfs@...r.kernel.org"
	<linux-unionfs@...r.kernel.org>, "linux-mtd@...ts.infradead.org"
	<linux-mtd@...ts.infradead.org>, "linux-xfs@...r.kernel.org"
	<linux-xfs@...r.kernel.org>, "linux-nfs@...r.kernel.org"
	<linux-nfs@...r.kernel.org>
Subject: Re: [PATCH 05/14] fs: remove inode_update_time

On 11/13/25 22:26, Christoph Hellwig wrote:
> The only external user is gone now, open code it in the two VFS
> callers.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>   fs/inode.c         | 23 ++++++++---------------
>   include/linux/fs.h |  1 -
>   2 files changed, 8 insertions(+), 16 deletions(-)
>
> diff --git a/fs/inode.c b/fs/inode.c
> index 24dab63844db..d3edcc5baec9 100644
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -2107,19 +2107,6 @@ int generic_update_time(struct inode *inode, int flags)
>   }
>   EXPORT_SYMBOL(generic_update_time);
>   
> -/*
> - * This does the actual work of updating an inodes time or version.  Must have
> - * had called mnt_want_write() before calling this.
> - */
> -int inode_update_time(struct inode *inode, int flags)
> -{
> -	if (inode->i_op->update_time)
> -		return inode->i_op->update_time(inode, flags);
> -	generic_update_time(inode, flags);
> -	return 0;
> -}
> -EXPORT_SYMBOL(inode_update_time);
> -
>   /**
>    *	atime_needs_update	-	update the access time
>    *	@path: the &struct path to update
> @@ -2187,7 +2174,10 @@ void touch_atime(const struct path *path)
>   	 * We may also fail on filesystems that have the ability to make parts
>   	 * of the fs read only, e.g. subvolumes in Btrfs.
>   	 */
> -	inode_update_time(inode, S_ATIME);
> +	if (inode->i_op->update_time)
> +		inode->i_op->update_time(inode, S_ATIME);
> +	else
> +		generic_update_time(inode, S_ATIME);
>   	mnt_put_write_access(mnt);
>   skip_update:
>   	sb_end_write(inode->i_sb);
> @@ -2342,7 +2332,10 @@ static int file_update_time_flags(struct file *file, unsigned int flags)
>   
>   	if (mnt_get_write_access_file(file))
>   		return 0;
> -	ret = inode_update_time(inode, sync_mode);
> +	if (inode->i_op->update_time)
> +		ret = inode->i_op->update_time(inode, sync_mode);
> +	else
> +		generic_update_time(inode, sync_mode);
>   	mnt_put_write_access_file(file);
>   	return ret;
>   }

do you need to catch the value from generic_update_time() to match
if case ? although original code was returning 0 for generic_update_time()
case :

	if (inode->i_op->update_time)
    		ret = inode->i_op->update_time(inode, sync_mode);
    	else
   -		generic_update_time(inode, sync_mode);
   +		ret = generic_update_time(inode, sync_mode);
    	mnt_put_write_access_file(file);
    	return ret;


if not ignore this comment, looks good.

Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>

-ck


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ