aboutsummaryrefslogtreecommitdiffstats
path: root/features/yaffs2/fs-yaffs2-replace-CURRENT_TIME-by-other-appropriate-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'features/yaffs2/fs-yaffs2-replace-CURRENT_TIME-by-other-appropriate-.patch')
-rw-r--r--features/yaffs2/fs-yaffs2-replace-CURRENT_TIME-by-other-appropriate-.patch46
1 files changed, 29 insertions, 17 deletions
diff --git a/features/yaffs2/fs-yaffs2-replace-CURRENT_TIME-by-other-appropriate-.patch b/features/yaffs2/fs-yaffs2-replace-CURRENT_TIME-by-other-appropriate-.patch
index e715dd80..9cbcbced 100644
--- a/features/yaffs2/fs-yaffs2-replace-CURRENT_TIME-by-other-appropriate-.patch
+++ b/features/yaffs2/fs-yaffs2-replace-CURRENT_TIME-by-other-appropriate-.patch
@@ -1,7 +1,7 @@
-From 595f7d1759d94b951a602c1f81c1352e05d05c29 Mon Sep 17 00:00:00 2001
+From bed6e7dc3e9af951f3844d263a9cf35c6b202a41 Mon Sep 17 00:00:00 2001
From: Kevin Hao <kexin.hao@windriver.com>
Date: Fri, 25 Aug 2017 14:58:34 +0800
-Subject: [PATCH 1/2] fs: yaffs2: replace CURRENT_TIME by other appropriate
+Subject: [PATCH 1/7] fs: yaffs2: replace CURRENT_TIME by other appropriate
apis
The macro CURRENT_TIME has already been deleted by commit bfe1c566453a
@@ -12,36 +12,48 @@ times, and ktime_get_* function for others.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
- fs/yaffs2/yaffs_vfs.c | 2 +-
- fs/yaffs2/yportenv.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ fs/yaffs2/yaffs_vfs.c | 4 ++--
+ fs/yaffs2/yportenv.h | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/yaffs2/yaffs_vfs.c b/fs/yaffs2/yaffs_vfs.c
-index c9dea27a4a78..8b2019fe3c2c 100644
+index 34cdc58339a8..c1c80f7a33a0 100644
--- a/fs/yaffs2/yaffs_vfs.c
+++ b/fs/yaffs2/yaffs_vfs.c
-@@ -238,7 +238,7 @@ MODULE_PARM(yaffs_gc_control, "i");
-
+@@ -268,7 +268,7 @@ MODULE_PARM(yaffs_gc_control, "i");
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0))
+ #define update_dir_time(dir) do {\
+- (dir)->i_ctime = (dir)->i_mtime = CURRENT_TIME; \
++ (dir)->i_ctime = (dir)->i_mtime = current_time(dir); \
+ } while (0)
+ #elif (LINUX_VERSION_CODE < KERNEL_VERSION(4,18,0))
+ #define update_dir_time(dir) do {\
+@@ -276,7 +276,7 @@ MODULE_PARM(yaffs_gc_control, "i");
+ } while (0)
+ #else
#define update_dir_time(dir) do {\
-- (dir)->i_ctime = (dir)->i_mtime = CURRENT_TIME; \
-+ (dir)->i_ctime = (dir)->i_mtime = current_time(dir); \
- } while (0)
+- (dir)->i_ctime = (dir)->i_mtime = current_kernel_time64(); \
++ (dir)->i_ctime = (dir)->i_mtime = current_time(dir); \
+ } while (0)
+ #endif
- static void yaffs_fill_inode_from_obj(struct inode *inode,
diff --git a/fs/yaffs2/yportenv.h b/fs/yaffs2/yportenv.h
-index 8975af331ea1..0e4e64e45f47 100644
+index 68c239c07435..0185985cc8fc 100644
--- a/fs/yaffs2/yportenv.h
+++ b/fs/yaffs2/yportenv.h
-@@ -62,7 +62,7 @@
- #define YAFFS_LOSTNFOUND_MODE 0700
+@@ -62,9 +62,9 @@
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0))
-#define Y_CURRENT_TIME CURRENT_TIME.tv_sec
+#define Y_CURRENT_TIME ktime_get_real_seconds()
+ #else
+-#define Y_CURRENT_TIME current_kernel_time().tv_sec
++#define Y_CURRENT_TIME ktime_get_real_seconds()
+ #endif
#define Y_TIME_CONVERT(x) (x).tv_sec
#else
- #define Y_CURRENT_TIME CURRENT_TIME
--
-2.5.0
+2.19.1