Skip to contentSkip to conversation

hfsplus: set ctime after setxattr and removexattr

PATCH New Viacheslav Dubeyko 1 participant 1 message Mar 9

Subsystems (2)
lore
Share & tools
lore

Viacheslav Dubeyko

author maintainer
#0 lore raw

PATCH 1/1 hfsplus: set ctime after setxattr and removexattr

The generic/728 test-case complains that:
(1) Expected ctime needs to be changed after setxattr;
(2) Expected ctime needs to be changed after removexattr.

This patch adds calling inode_set_ctime_current() in __hfsplus_setxattr() and hfsplus_removexattr().

sudo ./check generic/728

FSTYP         -- hfsplus
PLATFORM      -- Linux/x86_64 hfsplus-testing-0001 7.0.0-rc1+ #6 SMP PREEMPT_DYNAMIC Mon Mar  9 14:29:30 PDT 2026
MKFS_OPTIONS  -- /dev/loop51

MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch

generic/728 35s ... 44s
Ran: generic/728
Passed all 1 tests

cc John Paul Adrian Glaubitz <[email protected]>
cc Yangtao Li <[email protected]>
---
 fs/hfsplus/xattr.c | 4 ++++
 1 file changed, 4 insertions(+)
fs/hfsplus/xattr.c +4 -0
index 9904944cbd54..796a649ea5af 100644
@@ -399,6 +399,8 @@ int __hfsplus_setxattr(struct inode *inode, const char *name,
 		goto end_setxattr;
 	}
 
+	inode_set_ctime_current(inode);
+
 end_setxattr:
 	hfs_find_exit(&cat_fd);
 	hfs_dbg("finished: res %d\n", err);
@@ -880,6 +882,8 @@ static int hfsplus_removexattr(struct inode *inode, const char *name)
 		goto end_removexattr;
 	}
 
+	inode_set_ctime_current(inode);
+
 end_removexattr:
 	hfs_find_exit(&cat_fd);
 
Signature · 1 line
2.43.0