fs: Replace current_fs_time() with current_time()

current_fs_time() uses struct super_block* as an argument.
As per Linus's suggestion, this is changed to take struct
inode* as a parameter instead. This is because the function
is primarily meant for vfs inode timestamps.
Also the function was renamed as per Arnd's suggestion.

Change all calls to current_fs_time() to use the new
current_time() function instead. current_fs_time() will be
deleted.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Deepa Dinamani 2016-09-14 07:48:06 -07:00 committed by Al Viro
parent 02027d42c3
commit c2050a454c
34 changed files with 70 additions and 70 deletions

View file

@ -1636,7 +1636,7 @@ bool atime_needs_update(const struct path *path, struct inode *inode)
if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
return false;
now = current_fs_time(inode->i_sb);
now = current_time(inode);
if (!relatime_need_update(mnt, inode, now))
return false;
@ -1670,7 +1670,7 @@ void touch_atime(const struct path *path)
* We may also fail on filesystems that have the ability to make parts
* of the fs read only, e.g. subvolumes in Btrfs.
*/
now = current_fs_time(inode->i_sb);
now = current_time(inode);
update_time(inode, &now, S_ATIME);
__mnt_drop_write(mnt);
skip_update:
@ -1793,7 +1793,7 @@ int file_update_time(struct file *file)
if (IS_NOCMTIME(inode))
return 0;
now = current_fs_time(inode->i_sb);
now = current_time(inode);
if (!timespec_equal(&inode->i_mtime, &now))
sync_it = S_MTIME;