hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/include/linux/sunrpc/rpc_pipe_fs.h
....@@ -2,8 +2,6 @@
22 #ifndef _LINUX_SUNRPC_RPC_PIPE_FS_H
33 #define _LINUX_SUNRPC_RPC_PIPE_FS_H
44
5
-#ifdef __KERNEL__
6
-
75 #include <linux/workqueue.h>
86
97 struct rpc_pipe_dir_head {
....@@ -94,6 +92,11 @@
9492 char __user *, size_t);
9593 extern int rpc_queue_upcall(struct rpc_pipe *, struct rpc_pipe_msg *);
9694
95
+/* returns true if the msg is in-flight, i.e., already eaten by the peer */
96
+static inline bool rpc_msg_is_inflight(const struct rpc_pipe_msg *msg) {
97
+ return (msg->copied != 0 && list_empty(&msg->list));
98
+}
99
+
97100 struct rpc_clnt;
98101 extern struct dentry *rpc_create_client_dir(struct dentry *, const char *, struct rpc_clnt *);
99102 extern int rpc_remove_client_dir(struct rpc_clnt *);
....@@ -132,5 +135,4 @@
132135
133136 extern bool gssd_running(struct net *net);
134137
135
-#endif
136138 #endif