You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'devel' into next
This commit is contained in:
+3
-3
@@ -234,7 +234,7 @@ rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
|
||||
list_for_each_entry_safe(cred, next, &cred_unused, cr_lru) {
|
||||
|
||||
/* Enforce a 60 second garbage collection moratorium */
|
||||
if (time_in_range(cred->cr_expire, expired, jiffies) &&
|
||||
if (time_in_range_open(cred->cr_expire, expired, jiffies) &&
|
||||
test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags) != 0)
|
||||
continue;
|
||||
|
||||
@@ -515,7 +515,7 @@ rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp,
|
||||
if (cred->cr_ops->crwrap_req)
|
||||
return cred->cr_ops->crwrap_req(task, encode, rqstp, data, obj);
|
||||
/* By default, we encode the arguments normally. */
|
||||
return rpc_call_xdrproc(encode, rqstp, data, obj);
|
||||
return encode(rqstp, data, obj);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -530,7 +530,7 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp,
|
||||
return cred->cr_ops->crunwrap_resp(task, decode, rqstp,
|
||||
data, obj);
|
||||
/* By default, we decode the arguments normally. */
|
||||
return rpc_call_xdrproc(decode, rqstp, data, obj);
|
||||
return decode(rqstp, data, obj);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
+239
-56
File diff suppressed because it is too large
Load Diff
@@ -152,7 +152,7 @@ g_token_size(struct xdr_netobj *mech, unsigned int body_size)
|
||||
return(1 + der_length_size(body_size) + body_size);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(g_token_size);
|
||||
EXPORT_SYMBOL_GPL(g_token_size);
|
||||
|
||||
/* fills in a buffer with the token header. The buffer is assumed to
|
||||
be the right size. buf is advanced past the token header */
|
||||
@@ -167,7 +167,7 @@ g_make_token_header(struct xdr_netobj *mech, int body_size, unsigned char **buf)
|
||||
TWRITE_STR(*buf, mech->data, ((int) mech->len));
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(g_make_token_header);
|
||||
EXPORT_SYMBOL_GPL(g_make_token_header);
|
||||
|
||||
/*
|
||||
* Given a buffer containing a token, reads and verifies the token,
|
||||
@@ -231,5 +231,5 @@ g_verify_token_header(struct xdr_netobj *mech, int *body_size,
|
||||
return(ret);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(g_verify_token_header);
|
||||
EXPORT_SYMBOL_GPL(g_verify_token_header);
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ gss_mech_register(struct gss_api_mech *gm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(gss_mech_register);
|
||||
EXPORT_SYMBOL_GPL(gss_mech_register);
|
||||
|
||||
void
|
||||
gss_mech_unregister(struct gss_api_mech *gm)
|
||||
@@ -129,7 +129,7 @@ gss_mech_unregister(struct gss_api_mech *gm)
|
||||
gss_mech_free(gm);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(gss_mech_unregister);
|
||||
EXPORT_SYMBOL_GPL(gss_mech_unregister);
|
||||
|
||||
struct gss_api_mech *
|
||||
gss_mech_get(struct gss_api_mech *gm)
|
||||
@@ -138,7 +138,7 @@ gss_mech_get(struct gss_api_mech *gm)
|
||||
return gm;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(gss_mech_get);
|
||||
EXPORT_SYMBOL_GPL(gss_mech_get);
|
||||
|
||||
struct gss_api_mech *
|
||||
gss_mech_get_by_name(const char *name)
|
||||
@@ -158,7 +158,7 @@ gss_mech_get_by_name(const char *name)
|
||||
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(gss_mech_get_by_name);
|
||||
EXPORT_SYMBOL_GPL(gss_mech_get_by_name);
|
||||
|
||||
static inline int
|
||||
mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor)
|
||||
@@ -191,7 +191,7 @@ gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
|
||||
return gm;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(gss_mech_get_by_pseudoflavor);
|
||||
EXPORT_SYMBOL_GPL(gss_mech_get_by_pseudoflavor);
|
||||
|
||||
u32
|
||||
gss_svc_to_pseudoflavor(struct gss_api_mech *gm, u32 service)
|
||||
@@ -205,7 +205,7 @@ gss_svc_to_pseudoflavor(struct gss_api_mech *gm, u32 service)
|
||||
}
|
||||
return RPC_AUTH_MAXFLAVOR; /* illegal value */
|
||||
}
|
||||
EXPORT_SYMBOL(gss_svc_to_pseudoflavor);
|
||||
EXPORT_SYMBOL_GPL(gss_svc_to_pseudoflavor);
|
||||
|
||||
u32
|
||||
gss_pseudoflavor_to_service(struct gss_api_mech *gm, u32 pseudoflavor)
|
||||
@@ -219,7 +219,7 @@ gss_pseudoflavor_to_service(struct gss_api_mech *gm, u32 pseudoflavor)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(gss_pseudoflavor_to_service);
|
||||
EXPORT_SYMBOL_GPL(gss_pseudoflavor_to_service);
|
||||
|
||||
char *
|
||||
gss_service_to_auth_domain_name(struct gss_api_mech *gm, u32 service)
|
||||
@@ -233,7 +233,7 @@ gss_service_to_auth_domain_name(struct gss_api_mech *gm, u32 service)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(gss_service_to_auth_domain_name);
|
||||
EXPORT_SYMBOL_GPL(gss_service_to_auth_domain_name);
|
||||
|
||||
void
|
||||
gss_mech_put(struct gss_api_mech * gm)
|
||||
@@ -242,7 +242,7 @@ gss_mech_put(struct gss_api_mech * gm)
|
||||
module_put(gm->gm_owner);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(gss_mech_put);
|
||||
EXPORT_SYMBOL_GPL(gss_mech_put);
|
||||
|
||||
/* The mech could probably be determined from the token instead, but it's just
|
||||
* as easy for now to pass it in. */
|
||||
|
||||
@@ -332,6 +332,7 @@ struct rsc {
|
||||
struct svc_cred cred;
|
||||
struct gss_svc_seq_data seqdata;
|
||||
struct gss_ctx *mechctx;
|
||||
char *client_name;
|
||||
};
|
||||
|
||||
static struct cache_head *rsc_table[RSC_HASHMAX];
|
||||
@@ -346,6 +347,7 @@ static void rsc_free(struct rsc *rsci)
|
||||
gss_delete_sec_context(&rsci->mechctx);
|
||||
if (rsci->cred.cr_group_info)
|
||||
put_group_info(rsci->cred.cr_group_info);
|
||||
kfree(rsci->client_name);
|
||||
}
|
||||
|
||||
static void rsc_put(struct kref *ref)
|
||||
@@ -383,6 +385,7 @@ rsc_init(struct cache_head *cnew, struct cache_head *ctmp)
|
||||
tmp->handle.data = NULL;
|
||||
new->mechctx = NULL;
|
||||
new->cred.cr_group_info = NULL;
|
||||
new->client_name = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -397,6 +400,8 @@ update_rsc(struct cache_head *cnew, struct cache_head *ctmp)
|
||||
spin_lock_init(&new->seqdata.sd_lock);
|
||||
new->cred = tmp->cred;
|
||||
tmp->cred.cr_group_info = NULL;
|
||||
new->client_name = tmp->client_name;
|
||||
tmp->client_name = NULL;
|
||||
}
|
||||
|
||||
static struct cache_head *
|
||||
@@ -486,6 +491,15 @@ static int rsc_parse(struct cache_detail *cd,
|
||||
status = gss_import_sec_context(buf, len, gm, &rsci.mechctx);
|
||||
if (status)
|
||||
goto out;
|
||||
|
||||
/* get client name */
|
||||
len = qword_get(&mesg, buf, mlen);
|
||||
if (len > 0) {
|
||||
rsci.client_name = kstrdup(buf, GFP_KERNEL);
|
||||
if (!rsci.client_name)
|
||||
goto out;
|
||||
}
|
||||
|
||||
}
|
||||
rsci.h.expiry_time = expiry;
|
||||
rscp = rsc_update(&rsci, rscp);
|
||||
@@ -746,7 +760,7 @@ u32 svcauth_gss_flavor(struct auth_domain *dom)
|
||||
return gd->pseudoflavor;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(svcauth_gss_flavor);
|
||||
EXPORT_SYMBOL_GPL(svcauth_gss_flavor);
|
||||
|
||||
int
|
||||
svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name)
|
||||
@@ -780,7 +794,7 @@ out:
|
||||
return stat;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(svcauth_gss_register_pseudoflavor);
|
||||
EXPORT_SYMBOL_GPL(svcauth_gss_register_pseudoflavor);
|
||||
|
||||
static inline int
|
||||
read_u32_from_xdr_buf(struct xdr_buf *buf, int base, u32 *obj)
|
||||
@@ -913,6 +927,16 @@ struct gss_svc_data {
|
||||
struct rsc *rsci;
|
||||
};
|
||||
|
||||
char *svc_gss_principal(struct svc_rqst *rqstp)
|
||||
{
|
||||
struct gss_svc_data *gd = (struct gss_svc_data *)rqstp->rq_auth_data;
|
||||
|
||||
if (gd && gd->rsci)
|
||||
return gd->rsci->client_name;
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(svc_gss_principal);
|
||||
|
||||
static int
|
||||
svcauth_gss_set_client(struct svc_rqst *rqstp)
|
||||
{
|
||||
|
||||
@@ -197,6 +197,12 @@ static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args, stru
|
||||
|
||||
clnt->cl_rtt = &clnt->cl_rtt_default;
|
||||
rpc_init_rtt(&clnt->cl_rtt_default, clnt->cl_timeout->to_initval);
|
||||
clnt->cl_principal = NULL;
|
||||
if (args->client_name) {
|
||||
clnt->cl_principal = kstrdup(args->client_name, GFP_KERNEL);
|
||||
if (!clnt->cl_principal)
|
||||
goto out_no_principal;
|
||||
}
|
||||
|
||||
kref_init(&clnt->cl_kref);
|
||||
|
||||
@@ -226,6 +232,8 @@ out_no_auth:
|
||||
rpc_put_mount();
|
||||
}
|
||||
out_no_path:
|
||||
kfree(clnt->cl_principal);
|
||||
out_no_principal:
|
||||
rpc_free_iostats(clnt->cl_metrics);
|
||||
out_no_stats:
|
||||
if (clnt->cl_server != clnt->cl_inline_name)
|
||||
@@ -354,6 +362,11 @@ rpc_clone_client(struct rpc_clnt *clnt)
|
||||
new->cl_metrics = rpc_alloc_iostats(clnt);
|
||||
if (new->cl_metrics == NULL)
|
||||
goto out_no_stats;
|
||||
if (clnt->cl_principal) {
|
||||
new->cl_principal = kstrdup(clnt->cl_principal, GFP_KERNEL);
|
||||
if (new->cl_principal == NULL)
|
||||
goto out_no_principal;
|
||||
}
|
||||
kref_init(&new->cl_kref);
|
||||
err = rpc_setup_pipedir(new, clnt->cl_program->pipe_dir_name);
|
||||
if (err != 0)
|
||||
@@ -366,6 +379,8 @@ rpc_clone_client(struct rpc_clnt *clnt)
|
||||
rpciod_up();
|
||||
return new;
|
||||
out_no_path:
|
||||
kfree(new->cl_principal);
|
||||
out_no_principal:
|
||||
rpc_free_iostats(new->cl_metrics);
|
||||
out_no_stats:
|
||||
kfree(new);
|
||||
@@ -417,6 +432,7 @@ rpc_free_client(struct kref *kref)
|
||||
out_free:
|
||||
rpc_unregister_client(clnt);
|
||||
rpc_free_iostats(clnt->cl_metrics);
|
||||
kfree(clnt->cl_principal);
|
||||
clnt->cl_metrics = NULL;
|
||||
xprt_put(clnt->cl_xprt);
|
||||
rpciod_down();
|
||||
|
||||
+29
-13
@@ -113,7 +113,7 @@ out:
|
||||
wake_up(&rpci->waitq);
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(rpc_queue_upcall);
|
||||
EXPORT_SYMBOL_GPL(rpc_queue_upcall);
|
||||
|
||||
static inline void
|
||||
rpc_inode_setowner(struct inode *inode, void *private)
|
||||
@@ -126,13 +126,14 @@ rpc_close_pipes(struct inode *inode)
|
||||
{
|
||||
struct rpc_inode *rpci = RPC_I(inode);
|
||||
struct rpc_pipe_ops *ops;
|
||||
int need_release;
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
ops = rpci->ops;
|
||||
if (ops != NULL) {
|
||||
LIST_HEAD(free_list);
|
||||
|
||||
spin_lock(&inode->i_lock);
|
||||
need_release = rpci->nreaders != 0 || rpci->nwriters != 0;
|
||||
rpci->nreaders = 0;
|
||||
list_splice_init(&rpci->in_upcall, &free_list);
|
||||
list_splice_init(&rpci->pipe, &free_list);
|
||||
@@ -141,7 +142,7 @@ rpc_close_pipes(struct inode *inode)
|
||||
spin_unlock(&inode->i_lock);
|
||||
rpc_purge_list(rpci, &free_list, ops->destroy_msg, -EPIPE);
|
||||
rpci->nwriters = 0;
|
||||
if (ops->release_pipe)
|
||||
if (need_release && ops->release_pipe)
|
||||
ops->release_pipe(inode);
|
||||
cancel_delayed_work_sync(&rpci->queue_timeout);
|
||||
}
|
||||
@@ -169,16 +170,24 @@ static int
|
||||
rpc_pipe_open(struct inode *inode, struct file *filp)
|
||||
{
|
||||
struct rpc_inode *rpci = RPC_I(inode);
|
||||
int first_open;
|
||||
int res = -ENXIO;
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
if (rpci->ops != NULL) {
|
||||
if (filp->f_mode & FMODE_READ)
|
||||
rpci->nreaders ++;
|
||||
if (filp->f_mode & FMODE_WRITE)
|
||||
rpci->nwriters ++;
|
||||
res = 0;
|
||||
if (rpci->ops == NULL)
|
||||
goto out;
|
||||
first_open = rpci->nreaders == 0 && rpci->nwriters == 0;
|
||||
if (first_open && rpci->ops->open_pipe) {
|
||||
res = rpci->ops->open_pipe(inode);
|
||||
if (res)
|
||||
goto out;
|
||||
}
|
||||
if (filp->f_mode & FMODE_READ)
|
||||
rpci->nreaders++;
|
||||
if (filp->f_mode & FMODE_WRITE)
|
||||
rpci->nwriters++;
|
||||
res = 0;
|
||||
out:
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
return res;
|
||||
}
|
||||
@@ -188,6 +197,7 @@ rpc_pipe_release(struct inode *inode, struct file *filp)
|
||||
{
|
||||
struct rpc_inode *rpci = RPC_I(inode);
|
||||
struct rpc_pipe_msg *msg;
|
||||
int last_close;
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
if (rpci->ops == NULL)
|
||||
@@ -214,7 +224,8 @@ rpc_pipe_release(struct inode *inode, struct file *filp)
|
||||
rpci->ops->destroy_msg, -EAGAIN);
|
||||
}
|
||||
}
|
||||
if (rpci->ops->release_pipe)
|
||||
last_close = rpci->nwriters == 0 && rpci->nreaders == 0;
|
||||
if (last_close && rpci->ops->release_pipe)
|
||||
rpci->ops->release_pipe(inode);
|
||||
out:
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
@@ -396,6 +407,7 @@ enum {
|
||||
RPCAUTH_nfs,
|
||||
RPCAUTH_portmap,
|
||||
RPCAUTH_statd,
|
||||
RPCAUTH_nfsd4_cb,
|
||||
RPCAUTH_RootEOF
|
||||
};
|
||||
|
||||
@@ -429,6 +441,10 @@ static struct rpc_filelist files[] = {
|
||||
.name = "statd",
|
||||
.mode = S_IFDIR | S_IRUGO | S_IXUGO,
|
||||
},
|
||||
[RPCAUTH_nfsd4_cb] = {
|
||||
.name = "nfsd4_cb",
|
||||
.mode = S_IFDIR | S_IRUGO | S_IXUGO,
|
||||
},
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -748,7 +764,7 @@ rpc_rmdir(struct dentry *dentry)
|
||||
* @name: name of pipe
|
||||
* @private: private data to associate with the pipe, for the caller's use
|
||||
* @ops: operations defining the behavior of the pipe: upcall, downcall,
|
||||
* release_pipe, and destroy_msg.
|
||||
* release_pipe, open_pipe, and destroy_msg.
|
||||
* @flags: rpc_inode flags
|
||||
*
|
||||
* Data is made available for userspace to read by calls to
|
||||
@@ -808,7 +824,7 @@ err_dput:
|
||||
-ENOMEM);
|
||||
goto out;
|
||||
}
|
||||
EXPORT_SYMBOL(rpc_mkpipe);
|
||||
EXPORT_SYMBOL_GPL(rpc_mkpipe);
|
||||
|
||||
/**
|
||||
* rpc_unlink - remove a pipe
|
||||
@@ -839,7 +855,7 @@ rpc_unlink(struct dentry *dentry)
|
||||
dput(parent);
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL(rpc_unlink);
|
||||
EXPORT_SYMBOL_GPL(rpc_unlink);
|
||||
|
||||
/*
|
||||
* populate the filesystem
|
||||
|
||||
+25
-25
@@ -28,7 +28,7 @@ xdr_encode_netobj(__be32 *p, const struct xdr_netobj *obj)
|
||||
memcpy(p, obj->data, obj->len);
|
||||
return p + XDR_QUADLEN(obj->len);
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_encode_netobj);
|
||||
EXPORT_SYMBOL_GPL(xdr_encode_netobj);
|
||||
|
||||
__be32 *
|
||||
xdr_decode_netobj(__be32 *p, struct xdr_netobj *obj)
|
||||
@@ -41,7 +41,7 @@ xdr_decode_netobj(__be32 *p, struct xdr_netobj *obj)
|
||||
obj->data = (u8 *) p;
|
||||
return p + XDR_QUADLEN(len);
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_decode_netobj);
|
||||
EXPORT_SYMBOL_GPL(xdr_decode_netobj);
|
||||
|
||||
/**
|
||||
* xdr_encode_opaque_fixed - Encode fixed length opaque data
|
||||
@@ -71,7 +71,7 @@ __be32 *xdr_encode_opaque_fixed(__be32 *p, const void *ptr, unsigned int nbytes)
|
||||
}
|
||||
return p;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_encode_opaque_fixed);
|
||||
EXPORT_SYMBOL_GPL(xdr_encode_opaque_fixed);
|
||||
|
||||
/**
|
||||
* xdr_encode_opaque - Encode variable length opaque data
|
||||
@@ -86,14 +86,14 @@ __be32 *xdr_encode_opaque(__be32 *p, const void *ptr, unsigned int nbytes)
|
||||
*p++ = htonl(nbytes);
|
||||
return xdr_encode_opaque_fixed(p, ptr, nbytes);
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_encode_opaque);
|
||||
EXPORT_SYMBOL_GPL(xdr_encode_opaque);
|
||||
|
||||
__be32 *
|
||||
xdr_encode_string(__be32 *p, const char *string)
|
||||
{
|
||||
return xdr_encode_array(p, string, strlen(string));
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_encode_string);
|
||||
EXPORT_SYMBOL_GPL(xdr_encode_string);
|
||||
|
||||
__be32 *
|
||||
xdr_decode_string_inplace(__be32 *p, char **sp,
|
||||
@@ -108,7 +108,7 @@ xdr_decode_string_inplace(__be32 *p, char **sp,
|
||||
*sp = (char *) p;
|
||||
return p + XDR_QUADLEN(len);
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_decode_string_inplace);
|
||||
EXPORT_SYMBOL_GPL(xdr_decode_string_inplace);
|
||||
|
||||
void
|
||||
xdr_encode_pages(struct xdr_buf *xdr, struct page **pages, unsigned int base,
|
||||
@@ -136,7 +136,7 @@ xdr_encode_pages(struct xdr_buf *xdr, struct page **pages, unsigned int base,
|
||||
xdr->buflen += len;
|
||||
xdr->len += len;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_encode_pages);
|
||||
EXPORT_SYMBOL_GPL(xdr_encode_pages);
|
||||
|
||||
void
|
||||
xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset,
|
||||
@@ -158,7 +158,7 @@ xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset,
|
||||
|
||||
xdr->buflen += len;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_inline_pages);
|
||||
EXPORT_SYMBOL_GPL(xdr_inline_pages);
|
||||
|
||||
/*
|
||||
* Helper routines for doing 'memmove' like operations on a struct xdr_buf
|
||||
@@ -428,7 +428,7 @@ xdr_shift_buf(struct xdr_buf *buf, size_t len)
|
||||
{
|
||||
xdr_shrink_bufhead(buf, len);
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_shift_buf);
|
||||
EXPORT_SYMBOL_GPL(xdr_shift_buf);
|
||||
|
||||
/**
|
||||
* xdr_init_encode - Initialize a struct xdr_stream for sending data.
|
||||
@@ -465,7 +465,7 @@ void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p)
|
||||
iov->iov_len += len;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_init_encode);
|
||||
EXPORT_SYMBOL_GPL(xdr_init_encode);
|
||||
|
||||
/**
|
||||
* xdr_reserve_space - Reserve buffer space for sending
|
||||
@@ -492,7 +492,7 @@ __be32 * xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes)
|
||||
xdr->buf->len += nbytes;
|
||||
return p;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_reserve_space);
|
||||
EXPORT_SYMBOL_GPL(xdr_reserve_space);
|
||||
|
||||
/**
|
||||
* xdr_write_pages - Insert a list of pages into an XDR buffer for sending
|
||||
@@ -527,7 +527,7 @@ void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, unsigned int b
|
||||
buf->buflen += len;
|
||||
buf->len += len;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_write_pages);
|
||||
EXPORT_SYMBOL_GPL(xdr_write_pages);
|
||||
|
||||
/**
|
||||
* xdr_init_decode - Initialize an xdr_stream for decoding data.
|
||||
@@ -547,7 +547,7 @@ void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p)
|
||||
xdr->p = p;
|
||||
xdr->end = (__be32 *)((char *)iov->iov_base + len);
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_init_decode);
|
||||
EXPORT_SYMBOL_GPL(xdr_init_decode);
|
||||
|
||||
/**
|
||||
* xdr_inline_decode - Retrieve non-page XDR data to decode
|
||||
@@ -569,7 +569,7 @@ __be32 * xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes)
|
||||
xdr->p = q;
|
||||
return p;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_inline_decode);
|
||||
EXPORT_SYMBOL_GPL(xdr_inline_decode);
|
||||
|
||||
/**
|
||||
* xdr_read_pages - Ensure page-based XDR data to decode is aligned at current pointer position
|
||||
@@ -613,7 +613,7 @@ void xdr_read_pages(struct xdr_stream *xdr, unsigned int len)
|
||||
xdr->p = (__be32 *)((char *)iov->iov_base + padding);
|
||||
xdr->end = (__be32 *)((char *)iov->iov_base + end);
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_read_pages);
|
||||
EXPORT_SYMBOL_GPL(xdr_read_pages);
|
||||
|
||||
/**
|
||||
* xdr_enter_page - decode data from the XDR page
|
||||
@@ -638,7 +638,7 @@ void xdr_enter_page(struct xdr_stream *xdr, unsigned int len)
|
||||
xdr->p = (__be32 *)(kaddr + xdr->buf->page_base);
|
||||
xdr->end = (__be32 *)((char *)xdr->p + len);
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_enter_page);
|
||||
EXPORT_SYMBOL_GPL(xdr_enter_page);
|
||||
|
||||
static struct kvec empty_iov = {.iov_base = NULL, .iov_len = 0};
|
||||
|
||||
@@ -650,7 +650,7 @@ xdr_buf_from_iov(struct kvec *iov, struct xdr_buf *buf)
|
||||
buf->page_len = 0;
|
||||
buf->buflen = buf->len = iov->iov_len;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_buf_from_iov);
|
||||
EXPORT_SYMBOL_GPL(xdr_buf_from_iov);
|
||||
|
||||
/* Sets subbuf to the portion of buf of length len beginning base bytes
|
||||
* from the start of buf. Returns -1 if base of length are out of bounds. */
|
||||
@@ -699,7 +699,7 @@ xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf,
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_buf_subsegment);
|
||||
EXPORT_SYMBOL_GPL(xdr_buf_subsegment);
|
||||
|
||||
static void __read_bytes_from_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len)
|
||||
{
|
||||
@@ -730,7 +730,7 @@ int read_bytes_from_xdr_buf(struct xdr_buf *buf, unsigned int base, void *obj, u
|
||||
__read_bytes_from_xdr_buf(&subbuf, obj, len);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(read_bytes_from_xdr_buf);
|
||||
EXPORT_SYMBOL_GPL(read_bytes_from_xdr_buf);
|
||||
|
||||
static void __write_bytes_to_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len)
|
||||
{
|
||||
@@ -774,7 +774,7 @@ xdr_decode_word(struct xdr_buf *buf, unsigned int base, u32 *obj)
|
||||
*obj = ntohl(raw);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_decode_word);
|
||||
EXPORT_SYMBOL_GPL(xdr_decode_word);
|
||||
|
||||
int
|
||||
xdr_encode_word(struct xdr_buf *buf, unsigned int base, u32 obj)
|
||||
@@ -783,7 +783,7 @@ xdr_encode_word(struct xdr_buf *buf, unsigned int base, u32 obj)
|
||||
|
||||
return write_bytes_to_xdr_buf(buf, base, &raw, sizeof(obj));
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_encode_word);
|
||||
EXPORT_SYMBOL_GPL(xdr_encode_word);
|
||||
|
||||
/* If the netobj starting offset bytes from the start of xdr_buf is contained
|
||||
* entirely in the head or the tail, set object to point to it; otherwise
|
||||
@@ -821,7 +821,7 @@ int xdr_buf_read_netobj(struct xdr_buf *buf, struct xdr_netobj *obj, unsigned in
|
||||
__read_bytes_from_xdr_buf(&subbuf, obj->data, obj->len);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_buf_read_netobj);
|
||||
EXPORT_SYMBOL_GPL(xdr_buf_read_netobj);
|
||||
|
||||
/* Returns 0 on success, or else a negative error code. */
|
||||
static int
|
||||
@@ -1027,7 +1027,7 @@ xdr_decode_array2(struct xdr_buf *buf, unsigned int base,
|
||||
|
||||
return xdr_xcode_array2(buf, base, desc, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_decode_array2);
|
||||
EXPORT_SYMBOL_GPL(xdr_decode_array2);
|
||||
|
||||
int
|
||||
xdr_encode_array2(struct xdr_buf *buf, unsigned int base,
|
||||
@@ -1039,7 +1039,7 @@ xdr_encode_array2(struct xdr_buf *buf, unsigned int base,
|
||||
|
||||
return xdr_xcode_array2(buf, base, desc, 1);
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_encode_array2);
|
||||
EXPORT_SYMBOL_GPL(xdr_encode_array2);
|
||||
|
||||
int
|
||||
xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len,
|
||||
@@ -1106,5 +1106,5 @@ xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len,
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(xdr_process_buf);
|
||||
EXPORT_SYMBOL_GPL(xdr_process_buf);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user