summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-02-26 15:38:33 +0100
committerDavid Sterba <dsterba@suse.com>2016-02-26 15:38:33 +0100
commitf004fae0cfeb96d33240eb5471f14cb6fbbd4eea (patch)
tree8a0cc3be4e031298ef1f6db573c5f57da333737e /fs/btrfs/transaction.c
parentMerge branch 'foreign/liubo/replace-lockup' into for-chris-4.6 (diff)
parentbtrfs: avoid uninitialized variable warning (diff)
downloadlinux-f004fae0cfeb96d33240eb5471f14cb6fbbd4eea.tar.xz
linux-f004fae0cfeb96d33240eb5471f14cb6fbbd4eea.zip
Merge branch 'cleanups-4.6' into for-chris-4.6
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index e9e95ef0644f..43885e51b882 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1335,7 +1335,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
struct dentry *dentry;
struct extent_buffer *tmp;
struct extent_buffer *old;
- struct timespec cur_time = CURRENT_TIME;
+ struct timespec cur_time;
int ret = 0;
u64 to_reserve = 0;
u64 index = 0;
@@ -1385,6 +1385,8 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
parent_root = BTRFS_I(parent_inode)->root;
record_root_in_trans(trans, parent_root);
+ cur_time = current_fs_time(parent_inode->i_sb);
+
/*
* insert the directory item
*/
@@ -1527,7 +1529,8 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
btrfs_i_size_write(parent_inode, parent_inode->i_size +
dentry->d_name.len * 2);
- parent_inode->i_mtime = parent_inode->i_ctime = CURRENT_TIME;
+ parent_inode->i_mtime = parent_inode->i_ctime =
+ current_fs_time(parent_inode->i_sb);
ret = btrfs_update_inode_fallback(trans, parent_root, parent_inode);
if (ret) {
btrfs_abort_transaction(trans, root, ret);