[Drbd-dev] [PATCH 5/8] fs: xfs: replace BIO_MAX_SECTORS with BIO_MAX_PAGES

Christoph Hellwig hch at infradead.org
Tue Mar 29 09:29:33 CEST 2016


> +	nr_pages = BIO_MAX_PAGES;
>  	if (nr_pages > total_nr_pages)
>  		nr_pages = total_nr_pages;

Looks reasonable, but the whole thing could simply become:

	nr_pages = min(total_nr_pages, BIO_MAX_PAGES);


More information about the drbd-dev mailing list