diff options
author | Chris Mason <clm@fb.com> | 2017-02-27 13:11:53 -0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2017-02-27 13:11:53 -0800 |
commit | ef6ebf324216eaea95ff30da5a8e78e2a4311eba (patch) | |
tree | 5357c0d811540028845a3e303a1bf2101b9a22a6 /fs/btrfs/tree-log.c | |
parent | 6288d6eabc7505f42dda34a2c2962f91914be3a4 (diff) | |
parent | 263d3995c93c6020576f6c93506412a0b9d1e932 (diff) |
Merge branch 'for-chris-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.11
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 3806853cde08..3cc972330ab3 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -673,6 +673,10 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans, unsigned long dest_offset; struct btrfs_key ins; + if (btrfs_file_extent_disk_bytenr(eb, item) == 0 && + btrfs_fs_incompat(fs_info, NO_HOLES)) + goto update_inode; + ret = btrfs_insert_empty_item(trans, root, path, key, sizeof(*item)); if (ret) @@ -825,6 +829,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans, } inode_add_bytes(inode, nbytes); +update_inode: ret = btrfs_update_inode(trans, root, inode); out: if (inode) |