mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
fs: Replace CURRENT_TIME with current_time() for inode timestamps
CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_time() instead. CURRENT_TIME is also not y2038 safe. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. As part of the effort current_time() will be extended to do range checks. Hence, it is necessary for all file system timestamps to use current_time(). Also, current_time() will be transitioned along with vfs to be y2038 safe. Note that whenever a single call to current_time() is used to change timestamps in different inodes, it is because they share the same time granularity. Signed-off-by: Deepa Dinamani <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Acked-by: Felipe Balbi <[email protected]> Acked-by: Steven Whitehouse <[email protected]> Acked-by: Ryusuke Konishi <[email protected]> Acked-by: David Sterba <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
2554c72edb
commit
078cd8279e
76 changed files with 182 additions and 182 deletions
|
|
@ -716,7 +716,7 @@ static struct inode * get_pipe_inode(void)
|
|||
inode->i_mode = S_IFIFO | S_IRUSR | S_IWUSR;
|
||||
inode->i_uid = current_fsuid();
|
||||
inode->i_gid = current_fsgid();
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
|
||||
|
||||
return inode;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue