Btrfs: introduce subvol uuids and times
[linux-2.6-block.git] / fs / btrfs / inode.c
index a7d1921ac76b8ee5d85d563c1ceed80f4a65a2dd..4ffc8738954557c0317e9a425623f08dfb6497b9 100644 (file)
@@ -2734,6 +2734,8 @@ noinline int btrfs_update_inode(struct btrfs_trans_handle *trans,
         */
        if (!btrfs_is_free_space_inode(root, inode)
            && root->root_key.objectid != BTRFS_DATA_RELOC_TREE_OBJECTID) {
+               btrfs_update_root_times(trans, root);
+
                ret = btrfs_delayed_update_inode(trans, root, inode);
                if (!ret)
                        btrfs_set_inode_last_trans(trans, inode);
@@ -4723,6 +4725,8 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
        trace_btrfs_inode_new(inode);
        btrfs_set_inode_last_trans(trans, inode);
 
+       btrfs_update_root_times(trans, root);
+
        return inode;
 fail:
        if (dir)