Skip to content

Commit 1298ad8

Browse files
r-c-nBrian Maly
authored andcommitted
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]> (cherry picked from commit adae46a) Orabug: 38034039 Reviewed-by: Anthony Yznaga <[email protected]> Reviewed-by: Junxiao Bi <[email protected]> Signed-off-by: Stephen Brennan <[email protected]> Signed-off-by: Brian Maly <[email protected]>
1 parent c5e8843 commit 1298ad8

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
@@ -1362,7 +1362,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
13621362
if (WARN_ON_ONCE(!wbc->for_reclaim))
13631363
goto redirty;
13641364

1365-
if (WARN_ON_ONCE((info->flags & VM_LOCKED) || sbinfo->noswap))
1365+
if ((info->flags & VM_LOCKED) || sbinfo->noswap)
13661366
goto redirty;
13671367

13681368
if (!total_swap_pages)

0 commit comments

Comments
 (0)