Unverified Commit 913e9928 authored by Jeff Layton's avatar Jeff Layton Committed by Christian Brauner
Browse files

fs: drop the timespec64 argument from update_time



Now that all of the update_time operations are prepared for it, we can
drop the timespec64 argument from the update_time operation. Do that and
remove it from some associated functions like inode_update_time and
inode_needs_update_time.

Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Message-Id: <20230807-mgctime-v7-8-d1dec143a704@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 51b0f3eb
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -133,8 +133,7 @@ static int bad_inode_fiemap(struct inode *inode,
	return -EIO;
}

static int bad_inode_update_time(struct inode *inode, struct timespec64 *time,
				 int flags)
static int bad_inode_update_time(struct inode *inode, int flags)
{
	return -EIO;
}
+1 −2
Original line number Diff line number Diff line
@@ -6059,8 +6059,7 @@ static int btrfs_dirty_inode(struct btrfs_inode *inode)
 * This is a copy of file_update_time.  We need this so we can return error on
 * ENOSPC for updating the inode in the case of file write and mmap writes.
 */
static int btrfs_update_time(struct inode *inode, struct timespec64 *now,
			     int flags)
static int btrfs_update_time(struct inode *inode, int flags)
{
	struct btrfs_root *root = BTRFS_I(inode)->root;
	bool dirty = flags & ~S_VERSION;
+1 −3
Original line number Diff line number Diff line
@@ -1917,15 +1917,13 @@ static int btrfs_add_dev_item(struct btrfs_trans_handle *trans,
static void update_dev_time(const char *device_path)
{
	struct path path;
	struct timespec64 now;
	int ret;

	ret = kern_path(device_path, LOOKUP_FOLLOW, &path);
	if (ret)
		return;

	now = current_time(d_inode(path.dentry));
	inode_update_time(d_inode(path.dentry), &now, S_MTIME | S_CTIME | S_VERSION);
	inode_update_time(d_inode(path.dentry), S_MTIME | S_CTIME | S_VERSION);
	path_put(&path);
}

+1 −2
Original line number Diff line number Diff line
@@ -460,8 +460,7 @@ extern struct timespec64 fat_truncate_mtime(const struct msdos_sb_info *sbi,
					    const struct timespec64 *ts);
extern int fat_truncate_time(struct inode *inode, struct timespec64 *now,
			     int flags);
extern int fat_update_time(struct inode *inode, struct timespec64 *now,
			   int flags);
extern int fat_update_time(struct inode *inode, int flags);
extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs);

int fat_cache_init(void);
+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ int fat_truncate_time(struct inode *inode, struct timespec64 *now, int flags)
}
EXPORT_SYMBOL_GPL(fat_truncate_time);

int fat_update_time(struct inode *inode, struct timespec64 *now, int flags)
int fat_update_time(struct inode *inode, int flags)
{
	int dirty_flags = 0;

Loading