Re: [PATCH 04/13] iomap: drop the obsolete PF_MEMALLOC check in iomap_do_writepage

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

 



On Mon, Nov 27, 2023 at 07:41:07AM +0100, Christoph Hellwig wrote:
> On Mon, Nov 27, 2023 at 12:09:08PM +0530, Ritesh Harjani wrote:
> > Nice cleanup. As you explained, iomap_do_writepage() never gets called
> > from memory reclaim context. So it is unused code which can be removed. 
> > 
> > However, there was an instance when this WARN was hit by wrong
> > usage of PF_MEMALLOC flag [1], which was caught due to WARN_ON_ONCE.
> > 
> > [1]: https://lore.kernel.org/linux-xfs/20200309185714.42850-1-ebiggers@xxxxxxxxxx/
> > 
> > Maybe we can just have a WARN_ON_ONCE() and update the comments?
> > We anyway don't require "goto redirty" anymore since we will never
> > actually get called from reclaim context.
> 
> Well, xfs/iomap never really cared about the flag, just that it didn't
> get called from direct reclaim or kswapd.  If we think such a WARN_ON
> is still useful, the only caller of it in do_writepages might be a better
> place.

I think that's a good idea, given the enormous complexity of modern day
XFS and the sometimes rough quality of others.  :P

--D




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux