Since the commit
13bc24457850 ("fs: rename i_ctime field to __i_ctime")
of v6.6, struct inode::i_ctime is renamed as struct inode::__i_ctime.
Also, setting __i_ctime with current time can be done by
inode_set_ctime_current(), so convert with the function.
Change-Id: I7bf775cc6e308015f878123a68eb3d54e3ae76ab
Ref:
4c1698d3033d ("selinux: convert to ctime accessor functions")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
* your option) any later version.
*/
+#include <linux/version.h>
#include <linux/dcache.h>
#include <linux/fs.h>
#include <linux/fsnotify.h>
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))
+ inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
+#else
inode->i_atime = inode->i_ctime = inode->i_mtime = current_time(inode);
+#endif
inode->i_uid = node->uid;
inode->i_gid = node->gid;