[PATCH v3 1/1] xfs_io: make MADV_SOFT_OFFLINE conditional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mips64el does not have the symbol MADV_SOFT_OFFLINE, so wrap it in an
ifdef.

Signed-off-by: Bastian Germann <bage@xxxxxxxxxx>
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 io/madvise.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/io/madvise.c b/io/madvise.c
index ede23395..f26c03f1 100644
--- a/io/madvise.c
+++ b/io/madvise.c
@@ -40,7 +40,9 @@ madvise_help(void)
 " -H -- enable transparent hugepages (MADV_HUGEPAGE)\n"
 " -m -- mark the range mergeable (MADV_MERGEABLE)\n"
 " -M -- mark the range unmergeable (MADV_UNMERGEABLE)\n"
+#ifdef MADV_SOFT_OFFLINE
 " -o -- mark the range offline (MADV_SOFT_OFFLINE)\n"
+#endif
 " -p -- punch a hole in the file (MADV_REMOVE)\n"
 " -P -- poison the page cache (MADV_HWPOISON)\n"
 #ifdef MADV_POPULATE_READ
@@ -101,9 +103,12 @@ madvise_f(
 		case 'M':	/* disable merging */
 			advise = MADV_UNMERGEABLE;
 			break;
+#ifdef MADV_SOFT_OFFLINE
+/* MADV_SOFT_OFFLINE is undefined on mips */
 		case 'o':	/* offline */
 			advise = MADV_SOFT_OFFLINE;
 			break;
+#endif
 		case 'p':	/* punch hole */
 			advise = MADV_REMOVE;
 			break;
-- 
2.45.1





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux