Commit 6951867b authored by Benny Halevy's avatar Benny Halevy Committed by J. Bruce Fields

nfsd41: sunrpc: move struct rpc_buffer def into sunrpc.h

Move struct rpc_buffer's definition into a sunrpc.h, a common, internal
header file, in preparation for supporting the nfsv4.1 backchannel.
Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
[nfs41: sunrpc: #include <linux/net.h> from sunrpc.h]
Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent aed100fa
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include <linux/sunrpc/clnt.h> #include <linux/sunrpc/clnt.h>
#include "sunrpc.h"
#ifdef RPC_DEBUG #ifdef RPC_DEBUG
#define RPCDBG_FACILITY RPCDBG_SCHED #define RPCDBG_FACILITY RPCDBG_SCHED
#define RPC_TASK_MAGIC_ID 0xf00baa #define RPC_TASK_MAGIC_ID 0xf00baa
...@@ -711,11 +713,6 @@ static void rpc_async_schedule(struct work_struct *work) ...@@ -711,11 +713,6 @@ static void rpc_async_schedule(struct work_struct *work)
__rpc_execute(container_of(work, struct rpc_task, u.tk_work)); __rpc_execute(container_of(work, struct rpc_task, u.tk_work));
} }
struct rpc_buffer {
size_t len;
char data[];
};
/** /**
* rpc_malloc - allocate an RPC buffer * rpc_malloc - allocate an RPC buffer
* @task: RPC task that will use this buffer * @task: RPC task that will use this buffer
......
...@@ -27,6 +27,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -27,6 +27,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _NET_SUNRPC_SUNRPC_H #ifndef _NET_SUNRPC_SUNRPC_H
#define _NET_SUNRPC_SUNRPC_H #define _NET_SUNRPC_SUNRPC_H
#include <linux/net.h>
/*
* Header for dynamically allocated rpc buffers.
*/
struct rpc_buffer {
size_t len;
char data[];
};
static inline int rpc_reply_expected(struct rpc_task *task) static inline int rpc_reply_expected(struct rpc_task *task)
{ {
return (task->tk_msg.rpc_proc != NULL) && return (task->tk_msg.rpc_proc != NULL) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment