From: Florian Fainelli <florian.fainelli@broadcom.com>
To: linux-xfs@vger.kernel.org
Cc: mmayer@broadcom.com, justin.chen@broadcom.com,
catherine.hoang@oracle.com,
Florian Fainelli <florian.fainelli@broadcom.com>
Subject: [PATCH] xfs_io: Avoid using __kernel_rwf_t for older kernels
Date: Mon, 25 Nov 2024 14:26:18 -0800 [thread overview]
Message-ID: <20241125222618.1276708-1-florian.fainelli@broadcom.com> (raw)
__kernel_rwf_t was defined with upstream Linux commit
ddef7ed2b5cbafae692d1d580bb5a07808926a9c ("annotate RWF_... flags")
which has been included in Linux v4.14 and newer. When building xfsprogs
against older kernel headers, this type is not defined, leading to the
following build error:
pwrite.c: In function 'pwrite_f':
../include/xfs/linux.h:236:22: error: '__kernel_rwf_t' undeclared (first use in this function); did you mean '__kernel_off_t'?
#define RWF_ATOMIC ((__kernel_rwf_t)0x00000040)
^~~~~~~~~~~~~~
pwrite.c:329:22: note: in expansion of macro 'RWF_ATOMIC'
pwritev2_flags |= RWF_ATOMIC;
Fixes: ee6c5941352a ("xfs_io: add RWF_ATOMIC support to pwrite")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
include/linux.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux.h b/include/linux.h
index e9eb7bfb26a1..68b43393aad7 100644
--- a/include/linux.h
+++ b/include/linux.h
@@ -233,7 +233,7 @@ struct fsxattr {
/* Atomic Write */
#ifndef RWF_ATOMIC
-#define RWF_ATOMIC ((__kernel_rwf_t)0x00000040)
+#define RWF_ATOMIC (0x00000040)
#endif
/*
--
2.34.1
next reply other threads:[~2024-11-25 22:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 22:26 Florian Fainelli [this message]
2024-11-26 1:22 ` [PATCH] xfs_io: Avoid using __kernel_rwf_t for older kernels Darrick J. Wong
2024-11-26 1:29 ` Florian Fainelli
2025-01-07 19:13 ` Florian Fainelli
2024-11-26 4:53 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241125222618.1276708-1-florian.fainelli@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=catherine.hoang@oracle.com \
--cc=justin.chen@broadcom.com \
--cc=linux-xfs@vger.kernel.org \
--cc=mmayer@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox