On Tue, 2025-04-29 at 14:15 -0600, Yangtao Li wrote: > [BUG] > $ sudo ./check generic/003 > FSTYP -- hfsplus > PLATFORM -- Linux/x86_64 graphic 6.8.0-58-generic #60~22.04.1-Ubuntu > MKFS_OPTIONS -- /dev/loop29 > MOUNT_OPTIONS -- /dev/loop29 /mnt/scratch > > generic/003 - output mismatch > --- tests/generic/003.out 2025-04-27 08:49:39.876945323 -0600 > +++ /home/graphic/fs/xfstests-dev/results//generic/003.out.bad > > QA output created by 003 > +ERROR: change time has not been updated after changing file1 > Silence is golden > ... > > Ran: generic/003 > Failures: generic/003 > Failed 1 of 1 tests > > [CAUSE] > change time has not been updated after changing file1 > > [FIX] > Update file ctime after rename in hfsplus_rename(). > > Signed-off-by: Yangtao Li <frank.li@xxxxxxxx> > --- > fs/hfsplus/dir.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c > index 876bbb80fb4d..e77942440240 100644 > --- a/fs/hfsplus/dir.c > +++ b/fs/hfsplus/dir.c > @@ -534,6 +534,7 @@ static int hfsplus_rename(struct mnt_idmap *idmap, > struct inode *new_dir, struct dentry *new_dentry, > unsigned int flags) > { > + struct inode *inode = d_inode(old_dentry); > int res; > > if (flags & ~RENAME_NOREPLACE) > @@ -552,9 +553,13 @@ static int hfsplus_rename(struct mnt_idmap *idmap, > res = hfsplus_rename_cat((u32)(unsigned long)old_dentry->d_fsdata, > old_dir, &old_dentry->d_name, > new_dir, &new_dentry->d_name); > - if (!res) > - new_dentry->d_fsdata = old_dentry->d_fsdata; > - return res; > + if (res) > + return res; > + > + new_dentry->d_fsdata = old_dentry->d_fsdata; > + inode_set_ctime_current(inode); > + mark_inode_dirty(inode); > + return 0; > } > > const struct inode_operations hfsplus_dir_inode_operations = { BEFORE PATCH: sudo ./check generic/003 FSTYP -- hfsplus PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.15.0-rc4 #7 SMP PREEMPT_DYNAMIC Thu May 1 16:11:49 PDT 2025 MKFS_OPTIONS -- /dev/loop51 MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch generic/003 - output mismatch (see /home/slavad/XFSTESTS-2/xfstests- dev/results//generic/003.out.bad) --- tests/generic/003.out 2025-04-24 12:48:45.886164335 -0700 +++ /home/slavad/XFSTESTS-2/xfstests- dev/results//generic/003.out.bad 2025-05-01 16:42:51.220196434 -0700 @@ -1,2 +1,3 @@ QA output created by 003 +ERROR: change time has not been updated after changing file1 Silence is golden ... (Run 'diff -u /home/slavad/XFSTESTS-2/xfstests-dev/tests/generic/003.out /home/slavad/XFSTESTS-2/xfstests-dev/results//generic/003.out.bad' to see the entire diff) Ran: generic/003 Failures: generic/003 Failed 1 of 1 tests WITH APPLIED PATCH: sudo ./check generic/003 FSTYP -- hfsplus PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.15.0-rc4+ #8 SMP PREEMPT_DYNAMIC Thu May 1 16:43:22 PDT 2025 MKFS_OPTIONS -- /dev/loop51 MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch generic/003 35s Ran: generic/003 Passed all 1 tests Tested-by: Viacheslav Dubeyko <slava@xxxxxxxxxxx> Reviewed-by: Viacheslav Dubeyko <slava@xxxxxxxxxxx> Thanks, Slava.