diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/file.c | 6 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 22 | ||||
-rw-r--r-- | fs/btrfs/ioctl.c | 8 | ||||
-rw-r--r-- | fs/btrfs/transaction.c | 4 | ||||
-rw-r--r-- | fs/btrfs/xattr.c | 2 |
5 files changed, 21 insertions, 21 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); |
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) && |
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index b2a2da5893af..c48e37444717 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -349,7 +349,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) | |||
349 | 349 | ||
350 | btrfs_update_iflags(inode); | 350 | btrfs_update_iflags(inode); |
351 | inode_inc_iversion(inode); | 351 | inode_inc_iversion(inode); |
352 | inode->i_ctime = current_fs_time(inode->i_sb); | 352 | inode->i_ctime = current_time(inode); |
353 | ret = btrfs_update_inode(trans, root, inode); | 353 | ret = btrfs_update_inode(trans, root, inode); |
354 | 354 | ||
355 | btrfs_end_transaction(trans, root); | 355 | btrfs_end_transaction(trans, root); |
@@ -445,7 +445,7 @@ static noinline int create_subvol(struct inode *dir, | |||
445 | struct btrfs_root *root = BTRFS_I(dir)->root; | 445 | struct btrfs_root *root = BTRFS_I(dir)->root; |
446 | struct btrfs_root *new_root; | 446 | struct btrfs_root *new_root; |
447 | struct btrfs_block_rsv block_rsv; | 447 | struct btrfs_block_rsv block_rsv; |
448 | struct timespec cur_time = current_fs_time(dir->i_sb); | 448 | struct timespec cur_time = current_time(dir); |
449 | struct inode *inode; | 449 | struct inode *inode; |
450 | int ret; | 450 | int ret; |
451 | int err; | 451 | int err; |
@@ -3279,7 +3279,7 @@ static int clone_finish_inode_update(struct btrfs_trans_handle *trans, | |||
3279 | 3279 | ||
3280 | inode_inc_iversion(inode); | 3280 | inode_inc_iversion(inode); |
3281 | if (!no_time_update) | 3281 | if (!no_time_update) |
3282 | inode->i_mtime = inode->i_ctime = current_fs_time(inode->i_sb); | 3282 | inode->i_mtime = inode->i_ctime = current_time(inode); |
3283 | /* | 3283 | /* |
3284 | * We round up to the block size at eof when determining which | 3284 | * We round up to the block size at eof when determining which |
3285 | * extents to clone above, but shouldn't round up the file size. | 3285 | * 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, | |||
5094 | struct btrfs_root *root = BTRFS_I(inode)->root; | 5094 | struct btrfs_root *root = BTRFS_I(inode)->root; |
5095 | struct btrfs_root_item *root_item = &root->root_item; | 5095 | struct btrfs_root_item *root_item = &root->root_item; |
5096 | struct btrfs_trans_handle *trans; | 5096 | struct btrfs_trans_handle *trans; |
5097 | struct timespec ct = current_fs_time(inode->i_sb); | 5097 | struct timespec ct = current_time(inode); |
5098 | int ret = 0; | 5098 | int ret = 0; |
5099 | int received_uuid_changed; | 5099 | int received_uuid_changed; |
5100 | 5100 | ||
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 95d41919d034..c294313ea2c8 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -1474,7 +1474,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, | |||
1474 | parent_root = BTRFS_I(parent_inode)->root; | 1474 | parent_root = BTRFS_I(parent_inode)->root; |
1475 | record_root_in_trans(trans, parent_root, 0); | 1475 | record_root_in_trans(trans, parent_root, 0); |
1476 | 1476 | ||
1477 | cur_time = current_fs_time(parent_inode->i_sb); | 1477 | cur_time = current_time(parent_inode); |
1478 | 1478 | ||
1479 | /* | 1479 | /* |
1480 | * insert the directory item | 1480 | * insert the directory item |
@@ -1630,7 +1630,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, | |||
1630 | btrfs_i_size_write(parent_inode, parent_inode->i_size + | 1630 | btrfs_i_size_write(parent_inode, parent_inode->i_size + |
1631 | dentry->d_name.len * 2); | 1631 | dentry->d_name.len * 2); |
1632 | parent_inode->i_mtime = parent_inode->i_ctime = | 1632 | parent_inode->i_mtime = parent_inode->i_ctime = |
1633 | current_fs_time(parent_inode->i_sb); | 1633 | current_time(parent_inode); |
1634 | ret = btrfs_update_inode_fallback(trans, parent_root, parent_inode); | 1634 | ret = btrfs_update_inode_fallback(trans, parent_root, parent_inode); |
1635 | if (ret) { | 1635 | if (ret) { |
1636 | btrfs_abort_transaction(trans, ret); | 1636 | btrfs_abort_transaction(trans, ret); |
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c index d1a177a3dbe8..fccbf5567e78 100644 --- a/fs/btrfs/xattr.c +++ b/fs/btrfs/xattr.c | |||
@@ -252,7 +252,7 @@ int __btrfs_setxattr(struct btrfs_trans_handle *trans, | |||
252 | goto out; | 252 | goto out; |
253 | 253 | ||
254 | inode_inc_iversion(inode); | 254 | inode_inc_iversion(inode); |
255 | inode->i_ctime = current_fs_time(inode->i_sb); | 255 | inode->i_ctime = current_time(inode); |
256 | set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags); | 256 | set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags); |
257 | ret = btrfs_update_inode(trans, root, inode); | 257 | ret = btrfs_update_inode(trans, root, inode); |
258 | BUG_ON(ret); | 258 | BUG_ON(ret); |