Re: [PATCH v1 04/14] mm: Add support for async buffered writes

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

 



On Mon, Feb 14, 2022 at 09:43:53AM -0800, Stefan Roesch wrote:
> @@ -1986,6 +1987,10 @@ struct folio *__filemap_get_folio(struct address_space *mapping, pgoff_t index,
>  			gfp |= __GFP_WRITE;
>  		if (fgp_flags & FGP_NOFS)
>  			gfp &= ~__GFP_FS;
> +		if (fgp_flags & FGP_NOWAIT) {
> +			gfp |= GFP_ATOMIC;
> +			gfp &= ~__GFP_DIRECT_RECLAIM;
> +		}
>  
>  		folio = filemap_alloc_folio(gfp, 0);

No.  FGP_NOWAIT means "Don't block on page lock".  You can't redefine it
to mean "Use GFP_ATOMIC" without changing all the existing callers.  (Do
not change the existing callers).

__filemap_get_folio() already takes a gfp_t.  There's no need for this.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux