Re: [PATCH rfc 1/9] mm: migrate: simplify __buffer_migrate_folio()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 29, 2024 at 03:09:26PM +0800, Kefeng Wang wrote:
> @@ -774,24 +774,16 @@ static int __buffer_migrate_folio(struct address_space *mapping,
>  		}
>  	}
>  
> -	rc = folio_migrate_mapping(mapping, dst, src, 0);
> +	rc = filemap_migrate_folio(mapping, dst, src, mode);
>  	if (rc != MIGRATEPAGE_SUCCESS)
>  		goto unlock_buffers;
>  
> -	folio_attach_private(dst, folio_detach_private(src));
> -
>  	bh = head;
>  	do {
>  		folio_set_bh(bh, dst, bh_offset(bh));
>  		bh = bh->b_this_page;
>  	} while (bh != head);
>  
> -	if (mode != MIGRATE_SYNC_NO_COPY)
> -		folio_migrate_copy(dst, src);
> -	else
> -		folio_migrate_flags(dst, src);
> -
> -	rc = MIGRATEPAGE_SUCCESS;

I wondered if maybe there was an ordering requirement; that we had to
set up the BHs before copying the data over.  But I don't think there
is; the page should be frozen, the buffer heads are locked, and I don't
think the ordering matters.  So ...

Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux