Skip to content

Commit

Permalink
fat: make fat_update_time get its own timestamp
Browse files Browse the repository at this point in the history
In later patches, we're going to drop the "now" parameter from the
update_time operation. Fix fat_update_time to fetch its own timestamp.
It turns out that this is easily done by just passing a NULL timestamp
pointer to fat_truncate_time.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Frank Sorenson <sorenson@redhat.com>
Message-Id: <20230810-ctime-fat-v1-2-327598fd1de8@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
  • Loading branch information
jtlayton authored and brauner committed Aug 11, 2023
1 parent 93e6c30 commit 6f4aaee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fat/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ int fat_update_time(struct inode *inode, struct timespec64 *now, int flags)
return 0;

if (flags & (S_ATIME | S_CTIME | S_MTIME)) {
fat_truncate_time(inode, now, flags);
fat_truncate_time(inode, NULL, flags);
if (inode->i_sb->s_flags & SB_LAZYTIME)
dirty_flags |= I_DIRTY_TIME;
else
Expand Down

0 comments on commit 6f4aaee

Please sign in to comment.