Skip to content

Commit 66ceed9

Browse files
committed
webos: gator-mod=r5.3 (gator_fs: Fix build with linux-6.6 and newer)
:Release Notes: In Linux commit 13bc24457850583a2e7203ded05b7209ab4bc5ef, direct access to the i_ctime member of struct inode was removed. The new approach is to use accessor methods that exclusively handle passing the timestamp around by value. :Detailed Notes: More details in e.g.: darkbasic/zfs@0769c00 Fixes: http://gecko.lge.com:8000/Errors/Details/758170 In file included from TOPDIR/BUILD/work/qemux86_64-webos-linux/gator-mod/6.7+git/git/driver/gator_main.c:260: TOPDIR/BUILD/work/qemux86_64-webos-linux/gator-mod/6.7+git/git/driver/gator_fs.c: In function 'gatorfs_get_inode': TOPDIR/BUILD/work/qemux86_64-webos-linux/gator-mod/6.7+git/git/driver/gator_fs.c:46:50: error: 'struct inode' has no member named 'i_ctime'; did you mean 'i_atime'? 46 | inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); | ^~~~~~~ | i_atime :Testing Performed: Only build tested. :QA Notes: No change to image. :Issues Addressed: [WRQ-8231] CCC: gator-mod=r5.3 (gator_fs: Fix build with linux-6.6 and newer) [WRP-29491] Create GPVB with Yocto 5.0 Scarthgap Change-Id: Ic7bc48224dc3c40564e9fec2818c236e90700e32
1 parent 393f799 commit 66ceed9

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 64cc36df034bd38294db3ac87b507a6beedf0e77 Mon Sep 17 00:00:00 2001
2+
From: Martin Jansa <martin2.jansa@lgepartner.com>
3+
Date: Wed, 10 Jan 2024 19:24:23 +0100
4+
Subject: [PATCH] gator_fs: Fix build with linux-6.6 and newer
5+
6+
In Linux commit 13bc24457850583a2e7203ded05b7209ab4bc5ef, direct access
7+
to the i_ctime member of struct inode was removed. The new approach is
8+
to use accessor methods that exclusively handle passing the timestamp
9+
around by value.
10+
11+
More details in e.g.:
12+
https://github.com/darkbasic/zfs/commit/0769c0050e073ffdf58f37d4bdc0771db4aa9c4a
13+
---
14+
Upstream-Status: Pending
15+
16+
driver/gator_fs.c | 5 ++++-
17+
1 file changed, 4 insertions(+), 1 deletion(-)
18+
19+
diff --git a/driver/gator_fs.c b/driver/gator_fs.c
20+
index df37bba..3835b37 100644
21+
--- a/driver/gator_fs.c
22+
+++ b/driver/gator_fs.c
23+
@@ -42,8 +42,11 @@ static struct inode *gatorfs_get_inode(struct super_block *sb, int mode)
24+
inode->i_mode = mode;
25+
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
26+
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
27+
-#else
28+
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0)
29+
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
30+
+#else
31+
+ inode->i_atime = inode->i_mtime = current_time(inode);
32+
+ inode_set_ctime_to_ts(inode, inode->i_mtime);
33+
#endif
34+
}
35+
return inode;

meta-webos/recipes-core/gator/gator-mod_git.bb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require gator.inc
66
SUMMARY = "DS-5 Gator Kernel Module"
77
DESCRIPTION = "Target-side kernel module gathering data for ARM Streamline Performance Analyzer."
88

9-
PR = "${INC_PR}.2"
9+
PR = "${INC_PR}.3"
1010

1111
SRC_URI += " \
1212
file://0001-gator-modified-driver-Makefile-to-allow-compilation.patch;patchdir=.. \
@@ -25,6 +25,7 @@ SRC_URI += " \
2525
file://0014-gator_events_meminfo.c-use-DEFINE_SEMAPHORE-with-2-a.patch;patchdir=.. \
2626
file://0015-gator_pmu-fix-Waddress.patch;patchdir=.. \
2727
file://0016-Makefile-ignore-incompatible-pointer-types.patch;patchdir=.. \
28+
file://0017-gator_fs-Fix-build-with-linux-6.6-and-newer.patch;patchdir=.. \
2829
"
2930

3031
S = "${WORKDIR}/git/driver"

0 commit comments

Comments
 (0)