diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7c87f863d6f7..3aa82cec6bf7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -249,11 +249,8 @@ again: | |||
249 | if (bytenr == 0) | 249 | if (bytenr == 0) |
250 | goto not_found; | 250 | goto not_found; |
251 | 251 | ||
252 | if (btrfs_count_snapshots_in_path(root, path, inode->i_ino, | 252 | if (btrfs_cross_ref_exists(root, &found_key, bytenr)) |
253 | bytenr) != 1) { | ||
254 | goto not_found; | 253 | goto not_found; |
255 | } | ||
256 | |||
257 | /* | 254 | /* |
258 | * we may be called by the resizer, make sure we're inside | 255 | * we may be called by the resizer, make sure we're inside |
259 | * the limits of the FS | 256 | * the limits of the FS |
@@ -277,6 +274,7 @@ loop: | |||
277 | goto again; | 274 | goto again; |
278 | 275 | ||
279 | not_found: | 276 | not_found: |
277 | btrfs_release_path(root, path); | ||
280 | cow_file_range(inode, start, end); | 278 | cow_file_range(inode, start, end); |
281 | start = end + 1; | 279 | start = end + 1; |
282 | goto loop; | 280 | goto loop; |