Skip to content

Commit c04b3d0

Browse files
yang-shitorvalds
authored andcommitted
Revert "mm: swap: check if swap backing device is congested or not"
Due to the change about how block layer detects congestion the justification of commit 8fd2e0b ("mm: swap: check if swap backing device is congested or not") doesn't stand anymore, so the commit could be just reverted in order to solve the race reported by commit 2efa33f ("mm/shmem: fix shmem_swapin() race with swapoff"). The fix was reverted by the previous patch. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Yang Shi <[email protected]> Suggested-by: Hugh Dickins <[email protected]> Acked-by: Hugh Dickins <[email protected]> Cc: "Huang, Ying" <[email protected]> Cc: Miaohe Lin <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Joonsoo Kim <[email protected]> Cc: Minchan Kim <[email protected]> Cc: David Hildenbrand <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent b1e1ef3 commit c04b3d0

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

mm/swap_state.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -628,13 +628,6 @@ struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_mask,
628628
if (!mask)
629629
goto skip;
630630

631-
/* Test swap type to make sure the dereference is safe */
632-
if (likely(si->flags & (SWP_BLKDEV | SWP_FS_OPS))) {
633-
struct inode *inode = si->swap_file->f_mapping->host;
634-
if (inode_read_congested(inode))
635-
goto skip;
636-
}
637-
638631
do_poll = false;
639632
/* Read a page_cluster sized and aligned cluster around offset. */
640633
start_offset = offset & ~mask;

0 commit comments

Comments
 (0)