Skip to content

Commit 0332967

Browse files
josefbacikkdave
authored andcommitted
btrfs: unlock all the pages with successful inline extent creation
Since 4750af3 ("btrfs: prevent extent_clear_unlock_delalloc() to unlock page not locked by __process_pages_contig()") we have been unlocking the locked page manually instead of via extent_clear_unlock_delalloc() because of subpage blocksize support. However we actually disable inline extent creation for subpage blocksize support, so this behavior isn't necessary. Remove this code and comment, if at some point the subpage blocksize code grows support for inline extents this can be re-evaluated. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 6eecfa2 commit 0332967

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

fs/btrfs/inode.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,24 +1358,11 @@ static noinline int cow_file_range(struct btrfs_inode *inode,
13581358
* range.
13591359
*/
13601360
extent_clear_unlock_delalloc(inode, start, end,
1361-
locked_page,
1361+
NULL,
13621362
EXTENT_LOCKED | EXTENT_DELALLOC |
13631363
EXTENT_DELALLOC_NEW | EXTENT_DEFRAG |
13641364
EXTENT_DO_ACCOUNTING, PAGE_UNLOCK |
13651365
PAGE_START_WRITEBACK | PAGE_END_WRITEBACK);
1366-
/*
1367-
* locked_page is locked by the caller of
1368-
* writepage_delalloc(), not locked by
1369-
* __process_pages_contig().
1370-
*
1371-
* We can't let __process_pages_contig() to unlock it,
1372-
* as it doesn't have any subpage::writers recorded.
1373-
*
1374-
* Here we manually unlock the page, since the caller
1375-
* can't determine if it's an inline extent or a
1376-
* compressed extent.
1377-
*/
1378-
unlock_page(locked_page);
13791366
ret = 1;
13801367
goto done;
13811368
} else if (ret < 0) {

0 commit comments

Comments
 (0)