Skip to content

Commit 160e863

Browse files
author
Rafael Aquini
committed
mm: shmem: remove unnecessary warning in shmem_writepage()
JIRA: https://issues.redhat.com/browse/RHEL-84184 This patch is a backport of the following upstream commit: commit adae46a Author: Ricardo Cañuelo Navarro <[email protected]> Date: Wed Feb 26 13:26:27 2025 +0100 mm: shmem: remove unnecessary warning in shmem_writepage() Although the scenario where shmem_writepage() is called with info->flags & VM_LOCKED is unlikely to happen, it's still possible, as evidenced by syzbot [1]. However, the warning in this case isn't necessary because the situation is already handled correctly [2]. [2] https://lore.kernel.org/lkml/[email protected]/ Link: https://lkml.kernel.org/r/20250226-20250221-warning-in-shmem_writepage-v1-1-5ad19420e17e@igalia.com Fixes: 9a976f0 ("shmem: skip page split if we're not reclaiming") Signed-off-by: Ricardo Cañuelo Navarro <[email protected]> Reported-by: Pengfei Xu <[email protected]> Closes: https://lore.kernel.org/lkml/[email protected]/ [1] Suggested-by: Hugh Dickins <[email protected]> Reviewed-by: Baolin Wang <[email protected]> Cc: Florent Revest <[email protected]> Cc: Christian Brauner <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: Florent Revest <[email protected]> Cc: Luis Chamberalin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Rafael Aquini <[email protected]>
1 parent 5f4fc24 commit 160e863

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/shmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
14401440
if (WARN_ON_ONCE(!wbc->for_reclaim))
14411441
goto redirty;
14421442

1443-
if (WARN_ON_ONCE((info->flags & VM_LOCKED) || sbinfo->noswap))
1443+
if ((info->flags & VM_LOCKED) || sbinfo->noswap)
14441444
goto redirty;
14451445

14461446
if (!total_swap_pages)

0 commit comments

Comments
 (0)