Skip to content

Commit 2a3c4bc

Browse files
MiaoheLinMatthew Wilcox (Oracle)
authored and
Matthew Wilcox (Oracle)
committed
mm/damon: minor cleanup for damon_pa_young
if need_lock is true but folio_trylock fails, we should return false instead of NULL to match the return value type exactly. No functional change intended. Signed-off-by: Miaohe Lin <[email protected]> Reviewed-by: SeongJae Park <[email protected]> Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
1 parent 72e7258 commit 2a3c4bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/damon/paddr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static bool damon_pa_young(unsigned long paddr, unsigned long *page_sz)
152152
need_lock = !folio_test_anon(folio) || folio_test_ksm(folio);
153153
if (need_lock && !folio_trylock(folio)) {
154154
folio_put(folio);
155-
return NULL;
155+
return false;
156156
}
157157

158158
rmap_walk(folio, &rwc);

0 commit comments

Comments
 (0)