diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e6811c42e41e..2924774343e3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -4059,7 +4059,7 @@ err: | |||
4059 | inode_inc_iversion(inode); | 4059 | inode_inc_iversion(inode); |
4060 | inode_inc_iversion(dir); | 4060 | inode_inc_iversion(dir); |
4061 | inode->i_ctime = dir->i_mtime = | 4061 | inode->i_ctime = dir->i_mtime = |
4062 | dir->i_ctime = current_fs_time(inode->i_sb); | 4062 | dir->i_ctime = current_time(inode); |
4063 | ret = btrfs_update_inode(trans, root, dir); | 4063 | ret = btrfs_update_inode(trans, root, dir); |
4064 | out: | 4064 | out: |
4065 | return ret; | 4065 | return ret; |
@@ -4202,7 +4202,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans, | |||
4202 | 4202 | ||
4203 | btrfs_i_size_write(dir, dir->i_size - name_len * 2); | 4203 | btrfs_i_size_write(dir, dir->i_size - name_len * 2); |
4204 | inode_inc_iversion(dir); | 4204 | inode_inc_iversion(dir); |
4205 | dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb); | 4205 | dir->i_mtime = dir->i_ctime = current_time(dir); |
4206 | ret = btrfs_update_inode_fallback(trans, root, dir); | 4206 | ret = btrfs_update_inode_fallback(trans, root, dir); |
4207 | if (ret) | 4207 | if (ret) |
4208 | btrfs_abort_transaction(trans, ret); | 4208 | btrfs_abort_transaction(trans, ret); |
@@ -4965,7 +4965,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) | |||
4965 | inode_inc_iversion(inode); | 4965 | inode_inc_iversion(inode); |
4966 | if (!(mask & (ATTR_CTIME | ATTR_MTIME))) | 4966 | if (!(mask & (ATTR_CTIME | ATTR_MTIME))) |
4967 | inode->i_ctime = inode->i_mtime = | 4967 | inode->i_ctime = inode->i_mtime = |
4968 | current_fs_time(inode->i_sb); | 4968 | current_time(inode); |
4969 | } | 4969 | } |
4970 | 4970 | ||
4971 | if (newsize > oldsize) { | 4971 | if (newsize > oldsize) { |
@@ -5672,7 +5672,7 @@ static struct inode *new_simple_dir(struct super_block *s, | |||
5672 | inode->i_op = &btrfs_dir_ro_inode_operations; | 5672 | inode->i_op = &btrfs_dir_ro_inode_operations; |
5673 | inode->i_fop = &simple_dir_operations; | 5673 | inode->i_fop = &simple_dir_operations; |
5674 | inode->i_mode = S_IFDIR | S_IRUGO | S_IWUSR | S_IXUGO; | 5674 | inode->i_mode = S_IFDIR | S_IRUGO | S_IWUSR | S_IXUGO; |
5675 | inode->i_mtime = current_fs_time(inode->i_sb); | 5675 | inode->i_mtime = current_time(inode); |
5676 | inode->i_atime = inode->i_mtime; | 5676 | inode->i_atime = inode->i_mtime; |
5677 | inode->i_ctime = inode->i_mtime; | 5677 | inode->i_ctime = inode->i_mtime; |
5678 | BTRFS_I(inode)->i_otime = inode->i_mtime; | 5678 | BTRFS_I(inode)->i_otime = inode->i_mtime; |
@@ -6258,7 +6258,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, | |||
6258 | inode_init_owner(inode, dir, mode); | 6258 | inode_init_owner(inode, dir, mode); |
6259 | inode_set_bytes(inode, 0); | 6259 | inode_set_bytes(inode, 0); |
6260 | 6260 | ||
6261 | inode->i_mtime = current_fs_time(inode->i_sb); | 6261 | inode->i_mtime = current_time(inode); |
6262 | inode->i_atime = inode->i_mtime; | 6262 | inode->i_atime = inode->i_mtime; |
6263 | inode->i_ctime = inode->i_mtime; | 6263 | inode->i_ctime = inode->i_mtime; |
6264 | BTRFS_I(inode)->i_otime = inode->i_mtime; | 6264 | BTRFS_I(inode)->i_otime = inode->i_mtime; |
@@ -6372,7 +6372,7 @@ int btrfs_add_link(struct btrfs_trans_handle *trans, | |||
6372 | name_len * 2); | 6372 | name_len * 2); |
6373 | inode_inc_iversion(parent_inode); | 6373 | inode_inc_iversion(parent_inode); |
6374 | parent_inode->i_mtime = parent_inode->i_ctime = | 6374 | parent_inode->i_mtime = parent_inode->i_ctime = |
6375 | current_fs_time(parent_inode->i_sb); | 6375 | current_time(parent_inode); |
6376 | ret = btrfs_update_inode(trans, root, parent_inode); | 6376 | ret = btrfs_update_inode(trans, root, parent_inode); |
6377 | if (ret) | 6377 | if (ret) |
6378 | btrfs_abort_transaction(trans, ret); | 6378 | btrfs_abort_transaction(trans, ret); |
@@ -6590,7 +6590,7 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir, | |||
6590 | BTRFS_I(inode)->dir_index = 0ULL; | 6590 | BTRFS_I(inode)->dir_index = 0ULL; |
6591 | inc_nlink(inode); | 6591 | inc_nlink(inode); |
6592 | inode_inc_iversion(inode); | 6592 | inode_inc_iversion(inode); |
6593 | inode->i_ctime = current_fs_time(inode->i_sb); | 6593 | inode->i_ctime = current_time(inode); |
6594 | ihold(inode); | 6594 | ihold(inode); |
6595 | set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags); | 6595 | set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags); |
6596 | 6596 | ||
@@ -9492,7 +9492,7 @@ static int btrfs_rename_exchange(struct inode *old_dir, | |||
9492 | struct btrfs_root *dest = BTRFS_I(new_dir)->root; | 9492 | struct btrfs_root *dest = BTRFS_I(new_dir)->root; |
9493 | struct inode *new_inode = new_dentry->d_inode; | 9493 | struct inode *new_inode = new_dentry->d_inode; |
9494 | struct inode *old_inode = old_dentry->d_inode; | 9494 | struct inode *old_inode = old_dentry->d_inode; |
9495 | struct timespec ctime = CURRENT_TIME; | 9495 | struct timespec ctime = current_time(old_inode); |
9496 | struct dentry *parent; | 9496 | struct dentry *parent; |
9497 | u64 old_ino = btrfs_ino(old_inode); | 9497 | u64 old_ino = btrfs_ino(old_inode); |
9498 | u64 new_ino = btrfs_ino(new_inode); | 9498 | u64 new_ino = btrfs_ino(new_inode); |
@@ -9860,7 +9860,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
9860 | inode_inc_iversion(old_inode); | 9860 | inode_inc_iversion(old_inode); |
9861 | old_dir->i_ctime = old_dir->i_mtime = | 9861 | old_dir->i_ctime = old_dir->i_mtime = |
9862 | new_dir->i_ctime = new_dir->i_mtime = | 9862 | new_dir->i_ctime = new_dir->i_mtime = |
9863 | old_inode->i_ctime = current_fs_time(old_dir->i_sb); | 9863 | old_inode->i_ctime = current_time(old_dir); |
9864 | 9864 | ||
9865 | if (old_dentry->d_parent != new_dentry->d_parent) | 9865 | if (old_dentry->d_parent != new_dentry->d_parent) |
9866 | btrfs_record_unlink_dir(trans, old_dir, old_inode, 1); | 9866 | btrfs_record_unlink_dir(trans, old_dir, old_inode, 1); |
@@ -9885,7 +9885,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
9885 | 9885 | ||
9886 | if (new_inode) { | 9886 | if (new_inode) { |
9887 | inode_inc_iversion(new_inode); | 9887 | inode_inc_iversion(new_inode); |
9888 | new_inode->i_ctime = current_fs_time(new_inode->i_sb); | 9888 | new_inode->i_ctime = current_time(new_inode); |
9889 | if (unlikely(btrfs_ino(new_inode) == | 9889 | if (unlikely(btrfs_ino(new_inode) == |
9890 | BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) { | 9890 | BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) { |
9891 | root_objectid = BTRFS_I(new_inode)->location.objectid; | 9891 | root_objectid = BTRFS_I(new_inode)->location.objectid; |
@@ -10403,7 +10403,7 @@ next: | |||
10403 | *alloc_hint = ins.objectid + ins.offset; | 10403 | *alloc_hint = ins.objectid + ins.offset; |
10404 | 10404 | ||
10405 | inode_inc_iversion(inode); | 10405 | inode_inc_iversion(inode); |
10406 | inode->i_ctime = current_fs_time(inode->i_sb); | 10406 | inode->i_ctime = current_time(inode); |
10407 | BTRFS_I(inode)->flags |= BTRFS_INODE_PREALLOC; | 10407 | BTRFS_I(inode)->flags |= BTRFS_INODE_PREALLOC; |
10408 | if (!(mode & FALLOC_FL_KEEP_SIZE) && | 10408 | if (!(mode & FALLOC_FL_KEEP_SIZE) && |
10409 | (actual_len > inode->i_size) && | 10409 | (actual_len > inode->i_size) && |