diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ef399a7794ff..5b9567caba0a 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -3480,6 +3480,7 @@ static noinline void init_btrfs_i(struct inode *inode) | |||
3480 | bi->generation = 0; | 3480 | bi->generation = 0; |
3481 | bi->sequence = 0; | 3481 | bi->sequence = 0; |
3482 | bi->last_trans = 0; | 3482 | bi->last_trans = 0; |
3483 | bi->last_sub_trans = 0; | ||
3483 | bi->logged_trans = 0; | 3484 | bi->logged_trans = 0; |
3484 | bi->delalloc_bytes = 0; | 3485 | bi->delalloc_bytes = 0; |
3485 | bi->reserved_bytes = 0; | 3486 | bi->reserved_bytes = 0; |
@@ -4980,7 +4981,9 @@ again: | |||
4980 | set_page_dirty(page); | 4981 | set_page_dirty(page); |
4981 | SetPageUptodate(page); | 4982 | SetPageUptodate(page); |
4982 | 4983 | ||
4983 | BTRFS_I(inode)->last_trans = root->fs_info->generation + 1; | 4984 | BTRFS_I(inode)->last_trans = root->fs_info->generation; |
4985 | BTRFS_I(inode)->last_sub_trans = BTRFS_I(inode)->root->log_transid; | ||
4986 | |||
4984 | unlock_extent(io_tree, page_start, page_end, GFP_NOFS); | 4987 | unlock_extent(io_tree, page_start, page_end, GFP_NOFS); |
4985 | 4988 | ||
4986 | out_unlock: | 4989 | out_unlock: |
@@ -5100,6 +5103,7 @@ struct inode *btrfs_alloc_inode(struct super_block *sb) | |||
5100 | if (!ei) | 5103 | if (!ei) |
5101 | return NULL; | 5104 | return NULL; |
5102 | ei->last_trans = 0; | 5105 | ei->last_trans = 0; |
5106 | ei->last_sub_trans = 0; | ||
5103 | ei->logged_trans = 0; | 5107 | ei->logged_trans = 0; |
5104 | ei->outstanding_extents = 0; | 5108 | ei->outstanding_extents = 0; |
5105 | ei->reserved_extents = 0; | 5109 | ei->reserved_extents = 0; |