Skip to content

Commit

Permalink
Btrfs: make sure to record the transid in new inodes
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
chrismason-xx committed Jun 24, 2011
1 parent e999376 commit 1973f0f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -4520,6 +4520,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
inode_tree_add(inode);

trace_btrfs_inode_new(inode);
btrfs_set_inode_last_trans(trans, inode);

return inode;
fail:
Expand Down

0 comments on commit 1973f0f

Please sign in to comment.