kdbus: Rename inode atime, mtime and ctime fields 73/317673/1 accepted/tizen/unified/20250107.153645 accepted/tizen/unified/x/20250108.043355 accepted/tizen/unified/x/asan/20250113.002034
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 6 Jan 2025 07:13:18 +0000 (16:13 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 6 Jan 2025 11:48:17 +0000 (20:48 +0900)
With kernel version change, inode atime, mtime and ctime fields
are renamed. Use proper field name for kernel version.

Change-Id: Ic137a775ac5832c745e867eea8476e051ac9a8d1
Ref: commit 12cd44023651 ("fs: rename inode i_atime and i_mtime fields")
Ref: commit 077c212f0344 ("fs: new accessor methods for atime and mtime")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
kernel/kdbus/fs.c

index 5eb7973ee4e95cc5675af9ad3772fac61e8ee486..62ee487789020e5ec4bac094c9aee2cae8957604 100644 (file)
@@ -213,7 +213,11 @@ static struct inode *fs_inode_get(struct super_block *sb,
        inode->i_private = kdbus_node_ref(node);
        inode->i_mapping->a_ops = &empty_aops;
        inode->i_mode = node->mode & S_IALLUGO;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0))
+       inode_set_atime_to_ts(inode,
+                       inode_set_mtime_to_ts(inode,
+                               inode_set_ctime_current(inode)));
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0))
        inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
 #else
        inode->i_atime = inode->i_ctime = inode->i_mtime = current_time(inode);