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:
@@ -349,7 +349,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
|
||||
|
||||
btrfs_update_iflags(inode);
|
||||
inode_inc_iversion(inode);
|
||||
inode->i_ctime = current_fs_time(inode->i_sb);
|
||||
inode->i_ctime = current_time(inode);
|
||||
ret = btrfs_update_inode(trans, root, inode);
|
||||
|
||||
btrfs_end_transaction(trans, root);
|
||||
@@ -445,7 +445,7 @@ static noinline int create_subvol(struct inode *dir,
|
||||
struct btrfs_root *root = BTRFS_I(dir)->root;
|
||||
struct btrfs_root *new_root;
|
||||
struct btrfs_block_rsv block_rsv;
|
||||
struct timespec cur_time = current_fs_time(dir->i_sb);
|
||||
struct timespec cur_time = current_time(dir);
|
||||
struct inode *inode;
|
||||
int ret;
|
||||
int err;
|
||||
@@ -3279,7 +3279,7 @@ static int clone_finish_inode_update(struct btrfs_trans_handle *trans,
|
||||
|
||||
inode_inc_iversion(inode);
|
||||
if (!no_time_update)
|
||||
inode->i_mtime = inode->i_ctime = current_fs_time(inode->i_sb);
|
||||
inode->i_mtime = inode->i_ctime = current_time(inode);
|
||||
/*
|
||||
* We round up to the block size at eof when determining which
|
||||
* extents to clone above, but shouldn't round up the file size.
|
||||
@@ -5094,7 +5094,7 @@ static long _btrfs_ioctl_set_received_subvol(struct file *file,
|
||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||
struct btrfs_root_item *root_item = &root->root_item;
|
||||
struct btrfs_trans_handle *trans;
|
||||
struct timespec ct = current_fs_time(inode->i_sb);
|
||||
struct timespec ct = current_time(inode);
|
||||
int ret = 0;
|
||||
int received_uuid_changed;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user