Re: [PATCH 1/2] Remove inode_congested()

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

 



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?

> @@ -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;



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux