From 595f7d1759d94b951a602c1f81c1352e05d05c29 Mon Sep 17 00:00:00 2001 From: Kevin Hao Date: Fri, 25 Aug 2017 14:58:34 +0800 Subject: [PATCH 1/2] fs: yaffs2: replace CURRENT_TIME by other appropriate apis The macro CURRENT_TIME has already been deleted by commit bfe1c566453a ("time: delete CURRENT_TIME_SEC and CURRENT_TIME"). So we need to replace all the uses of CURRENT_TIME by current_time() for filesystem times, and ktime_get_* function for others. Signed-off-by: Kevin Hao Signed-off-by: Bruce Ashfield --- fs/yaffs2/yaffs_vfs.c | 2 +- fs/yaffs2/yportenv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/yaffs2/yaffs_vfs.c b/fs/yaffs2/yaffs_vfs.c index c9dea27a4a78..8b2019fe3c2c 100644 --- a/fs/yaffs2/yaffs_vfs.c +++ b/fs/yaffs2/yaffs_vfs.c @@ -238,7 +238,7 @@ MODULE_PARM(yaffs_gc_control, "i"); #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) 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 --- a/fs/yaffs2/yportenv.h +++ b/fs/yaffs2/yportenv.h @@ -62,7 +62,7 @@ #define YAFFS_LOSTNFOUND_MODE 0700 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) -#define Y_CURRENT_TIME CURRENT_TIME.tv_sec +#define Y_CURRENT_TIME ktime_get_real_seconds() #define Y_TIME_CONVERT(x) (x).tv_sec #else #define Y_CURRENT_TIME CURRENT_TIME -- 2.5.0