Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: memory-failure: enhance comments for return value of memory_failure()

The comments for the return value of memory_failure are not complete,
supplement the comments.

Link: https://lkml.kernel.org/r/20250312112852.82415-4-xueshuai@linux.alibaba.com
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Reviewed-by: Jane Chu <jane.chu@oracle.com>
Acked-by: Miaohe Lin <linmiaohe@huawei.com>
Tested-by: Tony Luck <tony.luck@intel.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Borislav Betkov <bp@alien8.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ruidong Tian <tianruidong@linux.alibaba.com>
Cc: Thomas Gleinxer <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Shuai Xue and committed by
Andrew Morton
d2734f04 aaf99ac2

+7 -3
+7 -3
mm/memory-failure.c
··· 2215 2215 * Must run in process context (e.g. a work queue) with interrupts 2216 2216 * enabled and no spinlocks held. 2217 2217 * 2218 - * Return: 0 for successfully handled the memory error, 2219 - * -EOPNOTSUPP for hwpoison_filter() filtered the error event, 2220 - * < 0(except -EOPNOTSUPP) on failure. 2218 + * Return: 2219 + * 0 - success, 2220 + * -ENXIO - memory not managed by the kernel 2221 + * -EOPNOTSUPP - hwpoison_filter() filtered the error event, 2222 + * -EHWPOISON - the page was already poisoned, potentially 2223 + * kill process, 2224 + * other negative values - failure. 2221 2225 */ 2222 2226 int memory_failure(unsigned long pfn, int flags) 2223 2227 {