aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2016-09-14 10:48:06 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-09-27 21:06:22 -0400
commitc2050a454c7f123d7a57fa1d76ff61bd43643abb (patch)
tree6f45ffffaf10f2534a38bfa28efb70ec24026a8d /fs/btrfs/file.c
parent02027d42c3f747945f19111d3da2092ed2148ac8 (diff)
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>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index fea31a4a6e36..dad53ce54d91 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1757,7 +1757,7 @@ static void update_time_for_write(struct inode *inode)
1757 if (IS_NOCMTIME(inode)) 1757 if (IS_NOCMTIME(inode))
1758 return; 1758 return;
1759 1759
1760 now = current_fs_time(inode->i_sb); 1760 now = current_time(inode);
1761 if (!timespec_equal(&inode->i_mtime, &now)) 1761 if (!timespec_equal(&inode->i_mtime, &now))
1762 inode->i_mtime = now; 1762 inode->i_mtime = now;
1763 1763
@@ -2578,7 +2578,7 @@ out_trans:
2578 goto out_free; 2578 goto out_free;
2579 2579
2580 inode_inc_iversion(inode); 2580 inode_inc_iversion(inode);
2581 inode->i_mtime = inode->i_ctime = current_fs_time(inode->i_sb); 2581 inode->i_mtime = inode->i_ctime = current_time(inode);
2582 2582
2583 trans->block_rsv = &root->fs_info->trans_block_rsv; 2583 trans->block_rsv = &root->fs_info->trans_block_rsv;
2584 ret = btrfs_update_inode(trans, root, inode); 2584 ret = btrfs_update_inode(trans, root, inode);
@@ -2842,7 +2842,7 @@ static long btrfs_fallocate(struct file *file, int mode,
2842 if (IS_ERR(trans)) { 2842 if (IS_ERR(trans)) {
2843 ret = PTR_ERR(trans); 2843 ret = PTR_ERR(trans);
2844 } else { 2844 } else {
2845 inode->i_ctime = current_fs_time(inode->i_sb); 2845 inode->i_ctime = current_time(inode);
2846 i_size_write(inode, actual_end); 2846 i_size_write(inode, actual_end);
2847 btrfs_ordered_update_i_size(inode, actual_end, NULL); 2847 btrfs_ordered_update_i_size(inode, actual_end, NULL);
2848 ret = btrfs_update_inode(trans, root, inode); 2848 ret = btrfs_update_inode(trans, root, inode);