From 04dd17822334871b23ea2862f7798fb0e0007777 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Sat, 11 May 2024 08:53:19 +0000 Subject: [PATCH] change otg to host mode --- kernel/include/linux/sunrpc/rpc_pipe_fs.h | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel/include/linux/sunrpc/rpc_pipe_fs.h b/kernel/include/linux/sunrpc/rpc_pipe_fs.h index e90b9bd..3b35b6f 100644 --- a/kernel/include/linux/sunrpc/rpc_pipe_fs.h +++ b/kernel/include/linux/sunrpc/rpc_pipe_fs.h @@ -2,8 +2,6 @@ #ifndef _LINUX_SUNRPC_RPC_PIPE_FS_H #define _LINUX_SUNRPC_RPC_PIPE_FS_H -#ifdef __KERNEL__ - #include <linux/workqueue.h> struct rpc_pipe_dir_head { @@ -94,6 +92,11 @@ char __user *, size_t); extern int rpc_queue_upcall(struct rpc_pipe *, struct rpc_pipe_msg *); +/* returns true if the msg is in-flight, i.e., already eaten by the peer */ +static inline bool rpc_msg_is_inflight(const struct rpc_pipe_msg *msg) { + return (msg->copied != 0 && list_empty(&msg->list)); +} + struct rpc_clnt; extern struct dentry *rpc_create_client_dir(struct dentry *, const char *, struct rpc_clnt *); extern int rpc_remove_client_dir(struct rpc_clnt *); @@ -132,5 +135,4 @@ extern bool gssd_running(struct net *net); -#endif #endif -- Gitblit v1.6.2