summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-06-14 09:17:42 (GMT)
committerIngo Molnar <mingo@kernel.org>2016-06-14 09:17:42 (GMT)
commit245050c287a9176cee9f98109df101909c1eeef4 (patch)
tree77358451bcc85e3fa2ab824240d5b351894ce74c /fs/btrfs/inode.c
parentd4c3be70ca0e7a1ae308bedd3462900c61e97b11 (diff)
parentdb06d759d6cf903aeda8c107fd3abd366dd80200 (diff)
downloadlinux-245050c287a9176cee9f98109df101909c1eeef4.tar.xz
Merge branch 'linus' into locking/core, to pick up fixes before merging new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 2704995..8b1212e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6979,7 +6979,18 @@ insert:
* existing will always be non-NULL, since there must be
* extent causing the -EEXIST.
*/
- if (start >= extent_map_end(existing) ||
+ if (existing->start == em->start &&
+ extent_map_end(existing) == extent_map_end(em) &&
+ em->block_start == existing->block_start) {
+ /*
+ * these two extents are the same, it happens
+ * with inlines especially
+ */
+ free_extent_map(em);
+ em = existing;
+ err = 0;
+
+ } else if (start >= extent_map_end(existing) ||
start <= existing->start) {
/*
* The existing extent map is the one nearest to