浏览代码

Btrfs: make sure to record the transid in new inodes

When we create a new inode, we aren't filling in the
field that records the transaction that last changed this
inode.

If we then go to fsync that inode, it will be skipped because the field
isn't filled in.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason 14 年之前
父节点
当前提交
1973f0faeb
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/btrfs/inode.c

+ 1 - 0
fs/btrfs/inode.c

@@ -4520,6 +4520,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
 	inode_tree_add(inode);
 	inode_tree_add(inode);
 
 
 	trace_btrfs_inode_new(inode);
 	trace_btrfs_inode_new(inode);
+	btrfs_set_inode_last_trans(trans, inode);
 
 
 	return inode;
 	return inode;
 fail:
 fail: