[PATCH 1/2] NFS: Move definition of enum nfs3_stable_how

Chuck Lever <[email protected]> Thu, 23 Jul 2026 14:20:42 -0400
Newsgroups org.kernel.vger.linux-nfs
Message-ID <[email protected]>
Clean up: enum nfs3_stable_how was introduced in NFSv3. NFSv2 has no
stable_how on the wire; its write path passes NFS_FILE_SYNC only as
a placeholder that the protocol ignores. The stable_how constants
describe an NFSv3 wire value, so they belong in linux/nfs3.h.

Signed-off-by: Chuck Lever <[email protected]>
---
 include/linux/nfs.h      | 9 ---------
 include/linux/nfs3.h     | 8 ++++++++
 include/trace/misc/nfs.h | 1 +
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/linux/nfs.h b/include/linux/nfs.h
index 0e2a0b1e3061..0e2b210c103b 100644
--- a/include/linux/nfs.h
+++ b/include/linux/nfs.h
@@ -22,13 +22,4 @@
 #define LOCALIOPROC_NULL		0
 #define LOCALIOPROC_UUID_IS_LOCAL	1
 
-enum nfs3_stable_how {
-	NFS_UNSTABLE = 0,
-	NFS_DATA_SYNC = 1,
-	NFS_FILE_SYNC = 2,
-
-	/* used by direct.c to mark verf as invalid */
-	NFS_INVALID_STABLE_HOW = -1
-};
-
 #endif /* _LINUX_NFS_H */
diff --git a/include/linux/nfs3.h b/include/linux/nfs3.h
index 404b8f724fc9..1d18da0860d5 100644
--- a/include/linux/nfs3.h
+++ b/include/linux/nfs3.h
@@ -7,6 +7,14 @@
 
 #include <uapi/linux/nfs3.h>
 
+enum nfs3_stable_how {
+	NFS_UNSTABLE = 0,
+	NFS_DATA_SYNC = 1,
+	NFS_FILE_SYNC = 2,
+
+	/* used to mark verf as invalid */
+	NFS_INVALID_STABLE_HOW = -1
+};
 
 /* Number of 32bit words in post_op_attr */
 #define NFS3_POST_OP_ATTR_WORDS		22
diff --git a/include/trace/misc/nfs.h b/include/trace/misc/nfs.h
index a394b4d38e18..b5fb77d7954b 100644
--- a/include/trace/misc/nfs.h
+++ b/include/trace/misc/nfs.h
@@ -8,6 +8,7 @@
  */
 
 #include <linux/nfs.h>
+#include <linux/nfs3.h>
 #include <linux/nfs4.h>
 #include <uapi/linux/nfs.h>
 
-- 
2.54.0