On Mon, Feb 22, 2021 at 02:33:54PM +0800, Qu Wenruo wrote:
> +static void end_bio_subpage_eb_writepage(struct btrfs_fs_info *fs_info,
> +                                      struct bio *bio)
> +{
> +     struct bio_vec *bvec;
> +     struct bvec_iter_all iter_all;
> +
> +     ASSERT(!bio_flagged(bio, BIO_CLONED));
> +     bio_for_each_segment_all(bvec, bio, iter_all) {
> +             struct page *page = bvec->bv_page;
> +             u64 bvec_start = page_offset(page) + bvec->bv_offset;
> +             u64 bvec_end = bvec_start + bvec->bv_len - 1;
> +             u64 cur_bytenr = bvec_start;
> +
> +             ASSERT(IS_ALIGNED(bvec->bv_len, fs_info->nodesize));
> +
> +             /* Iterate through all extent buffers in the range */
> +             while (cur_bytenr <= bvec_end) {
> +                     struct extent_buffer *eb;
> +                     int done;
> +
> +                     /*
> +                      * Here we can't use find_extent_buffer(), as it may
> +                      * try to lock eb->refs_lock, which is not safe in 
> endio 

Please make sure you don't leave whitespace damage in newly added code,
'git am' then fails to apply the patches and I need to fix it manually.

warning: 1 line adds whitespace errors.
*
* You have some suspicious patch lines:
*
* In fs/btrfs/extent_io.c
* trailing whitespace (line 4090)
fs/btrfs/extent_io.c:4090:                       * try to lock eb->refs_lock, 
which is not safe in endio

Reply via email to