Thread (8 messages) 8 messages, 4 authors, 2021-12-13

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

From: NeilBrown <hidden>
Date: 2021-12-13 04:59:48
Also in: linux-ext4, linux-fsdevel, linux-mm, lkml

On Mon, 13 Dec 2021, Matthew Wilcox wrote:
On Mon, Dec 13, 2021 at 03:14:27PM +1100, NeilBrown wrote:
quoted
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

quoted
@@ -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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help