hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/linux/sunrpc/rpc_pipe_fs.h
....@@ -92,6 +92,11 @@
9292 char __user *, size_t);
9393 extern int rpc_queue_upcall(struct rpc_pipe *, struct rpc_pipe_msg *);
9494
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
+
95100 struct rpc_clnt;
96101 extern struct dentry *rpc_create_client_dir(struct dentry *, const char *, struct rpc_clnt *);
97102 extern int rpc_remove_client_dir(struct rpc_clnt *);