diff options
author | 2017-05-08 15:59:25 -0700 | |
---|---|---|
committer | 2017-05-08 17:15:15 -0700 | |
commit | 607a11ad947794d0f4f2c0f73c654876d1abb9b1 (patch) | |
tree | 1eab3f7535afa4fa293c46e183acdb32ea74d9fa /fs/ubifs/ioctl.c | |
parent | fs: ufs: use ktime_get_real_ts64() for birthtime (diff) | |
download | linux-607a11ad947794d0f4f2c0f73c654876d1abb9b1.tar.gz linux-607a11ad947794d0f4f2c0f73c654876d1abb9b1.tar.bz2 linux-607a11ad947794d0f4f2c0f73c654876d1abb9b1.zip |
fs: ubifs: replace CURRENT_TIME_SEC with current_time
CURRENT_TIME_SEC is not y2038 safe. current_time() will be transitioned
to use 64 bit time along with vfs in a separate patch. There is no plan
to transition CURRENT_TIME_SEC to use y2038 safe time interfaces.
current_time() returns timestamps according to the granularities set in
the inode's super_block. The granularity check to call
current_fs_time() or CURRENT_TIME_SEC is not required.
Use current_time() directly to update inode timestamp. Use
timespec_trunc during file system creation, before the first inode is
created.
Link: http://lkml.kernel.org/r/1491613030-11599-9-git-send-email-deepa.kernel@gmail.com
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: Richard Weinberger <richard@nod.at>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ubifs/ioctl.c')
-rw-r--r-- | fs/ubifs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c index da519ba205f6..12b9eb5005ff 100644 --- a/fs/ubifs/ioctl.c +++ b/fs/ubifs/ioctl.c @@ -126,7 +126,7 @@ static int setflags(struct inode *inode, int flags) ui->flags = ioctl2ubifs(flags); ubifs_set_inode_flags(inode); - inode->i_ctime = ubifs_current_time(inode); + inode->i_ctime = current_time(inode); release = ui->dirty; mark_inode_dirty_sync(inode); mutex_unlock(&ui->ui_mutex); |