Message ID | 20210820020409.TZFRMik-6%akpm@linux-foundation.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [01/10] Revert "mm/shmem: fix shmem_swapin() race with swapoff" | expand |
--- a/mm/swap_state.c~revert-mm-swap-check-if-swap-backing-device-is-congested-or-not +++ a/mm/swap_state.c @@ -628,13 +628,6 @@ struct page *swap_cluster_readahead(swp_ if (!mask) goto skip; - /* Test swap type to make sure the dereference is safe */ - if (likely(si->flags & (SWP_BLKDEV | SWP_FS_OPS))) { - struct inode *inode = si->swap_file->f_mapping->host; - if (inode_read_congested(inode)) - goto skip; - } - do_poll = false; /* Read a page_cluster sized and aligned cluster around offset. */ start_offset = offset & ~mask;