diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2012-08-09 05:39:36 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-08-28 22:53:36 +0200 |
commit | c0f62dedd04ae0f3b8a18079db5a015af24e416f (patch) | |
tree | a4a3fad53c3a84034e880d923d4dfbbd648cf668 | |
parent | Btrfs: fix race in run_clustered_refs (diff) | |
download | linux-c0f62dedd04ae0f3b8a18079db5a015af24e416f.tar.xz linux-c0f62dedd04ae0f3b8a18079db5a015af24e416f.zip |
Btrfs: fix wrong mtime and ctime when creating snapshots
When we created a new snapshot, the mtime and ctime of its parent directory
were not updated. Fix it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/transaction.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 7208ada41e0e..3ee8d58e97ad 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1026,6 +1026,7 @@ 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; ret = btrfs_update_inode(trans, parent_root, parent_inode); if (ret) goto abort_trans_dput; |