lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <163937157093.22433.10907067066589299028@noble.neil.brown.name>
Date:   Mon, 13 Dec 2021 15:59:30 +1100
From:   "NeilBrown" <neilb@...e.de>
To:     "Matthew Wilcox" <willy@...radead.org>
Cc:     "Andrew Morton" <akpm@...ux-foundation.org>,
        "Mel Gorman" <mgorman@...e.de>,
        "Philipp Reisner" <philipp.reisner@...bit.com>,
        "Lars Ellenberg" <lars.ellenberg@...bit.com>,
        "Jan Kara" <jack@...e.com>,
        "Ryusuke Konishi" <konishi.ryusuke@...il.com>,
        "Darrick J. Wong" <djwong@...nel.org>, linux-xfs@...r.kernel.org,
        linux-ext4@...r.kernel.org, linux-nilfs@...r.kernel.org,
        linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] Remove inode_congested()

On Mon, 13 Dec 2021, Matthew Wilcox wrote:
> On Mon, Dec 13, 2021 at 03:14:27PM +1100, NeilBrown wrote:
> > diff --git a/mm/vmscan.c b/mm/vmscan.c
> > index fb9584641ac7..540aa0ea67ff 100644
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -989,17 +989,6 @@ static inline int is_page_cache_freeable(struct page *page)
> >  	return page_count(page) - page_has_private(page) == 1 + page_cache_pins;
> >  }
> >  
> > -static int may_write_to_inode(struct inode *inode)
> > -{
> > -	if (current->flags & PF_SWAPWRITE)
> > -		return 1;
> > -	if (!inode_write_congested(inode))
> > -		return 1;
> > -	if (inode_to_bdi(inode) == current->backing_dev_info)
> > -		return 1;
> > -	return 0;
> > -}
> 
> Why is it safe to get rid of the PF_SWAPWRITE and current->backing_dev_info
> checks?

Ask George Bool.
If inode_write_congested() returns False, then may_write_to_inode() will
always return True.

NeilBrown


> 
> > @@ -1158,8 +1147,6 @@ static pageout_t pageout(struct page *page, struct address_space *mapping)
> >  	}
> >  	if (mapping->a_ops->writepage == NULL)
> >  		return PAGE_ACTIVATE;
> > -	if (!may_write_to_inode(mapping->host))
> > -		return PAGE_KEEP;
> >  
> >  	if (clear_page_dirty_for_io(page)) {
> >  		int res;
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ