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>
这个提交包含在:
@@ -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);
|
||||
|
在新工单中引用
屏蔽一个用户