xdr_encode_opaque_fixed(p, verf->data, NFS4_VERIFIER_SIZE);
}
-static int encode_attrs(struct xdr_stream *xdr, const struct iattr *iap, const struct nfs_server *server)
+static void encode_attrs(struct xdr_stream *xdr, const struct iattr *iap, const struct nfs_server *server)
{
char owner_name[IDMAP_NAMESZ];
char owner_group[IDMAP_NAMESZ];
int len;
uint32_t bmval0 = 0;
uint32_t bmval1 = 0;
- int status;
/*
* We reserve enough space to write the entire attribute buffer at once.
*q++ = htonl(bmval1);
*q++ = htonl(len);
- status = 0;
/* out: */
- return status;
}
-static int encode_access(struct xdr_stream *xdr, u32 access, struct compound_hdr *hdr)
+static void encode_access(struct xdr_stream *xdr, u32 access, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(OP_ACCESS);
WRITE32(access);
hdr->nops++;
-
- return 0;
}
-static int encode_close(struct xdr_stream *xdr, const struct nfs_closeargs *arg, struct compound_hdr *hdr)
+static void encode_close(struct xdr_stream *xdr, const struct nfs_closeargs *arg, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(arg->seqid->sequence->counter);
WRITEMEM(arg->stateid->data, NFS4_STATEID_SIZE);
hdr->nops++;
-
- return 0;
}
-static int encode_commit(struct xdr_stream *xdr, const struct nfs_writeargs *args, struct compound_hdr *hdr)
+static void encode_commit(struct xdr_stream *xdr, const struct nfs_writeargs *args, struct compound_hdr *hdr)
{
__be32 *p;
WRITE64(args->offset);
WRITE32(args->count);
hdr->nops++;
-
- return 0;
}
-static int encode_create(struct xdr_stream *xdr, const struct nfs4_create_arg *create, struct compound_hdr *hdr)
+static void encode_create(struct xdr_stream *xdr, const struct nfs4_create_arg *create, struct compound_hdr *hdr)
{
__be32 *p;
WRITEMEM(create->name->name, create->name->len);
hdr->nops++;
- return encode_attrs(xdr, create->attrs, create->server);
+ encode_attrs(xdr, create->attrs, create->server);
}
-static int encode_getattr_one(struct xdr_stream *xdr, uint32_t bitmap, struct compound_hdr *hdr)
+static void encode_getattr_one(struct xdr_stream *xdr, uint32_t bitmap, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(1);
WRITE32(bitmap);
hdr->nops++;
- return 0;
}
-static int encode_getattr_two(struct xdr_stream *xdr, uint32_t bm0, uint32_t bm1, struct compound_hdr *hdr)
+static void encode_getattr_two(struct xdr_stream *xdr, uint32_t bm0, uint32_t bm1, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(bm0);
WRITE32(bm1);
hdr->nops++;
- return 0;
}
-static int encode_getfattr(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr)
+static void encode_getfattr(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr)
{
- return encode_getattr_two(xdr,
- bitmask[0] & nfs4_fattr_bitmap[0],
- bitmask[1] & nfs4_fattr_bitmap[1], hdr);
+ encode_getattr_two(xdr, bitmask[0] & nfs4_fattr_bitmap[0],
+ bitmask[1] & nfs4_fattr_bitmap[1], hdr);
}
-static int encode_fsinfo(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr)
+static void encode_fsinfo(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr)
{
- return encode_getattr_two(xdr, bitmask[0] & nfs4_fsinfo_bitmap[0],
- bitmask[1] & nfs4_fsinfo_bitmap[1], hdr);
+ encode_getattr_two(xdr, bitmask[0] & nfs4_fsinfo_bitmap[0],
+ bitmask[1] & nfs4_fsinfo_bitmap[1], hdr);
}
-static int encode_fs_locations(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr)
+static void encode_fs_locations(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr)
{
- return encode_getattr_two(xdr,
- bitmask[0] & nfs4_fs_locations_bitmap[0],
- bitmask[1] & nfs4_fs_locations_bitmap[1],
- hdr);
+ encode_getattr_two(xdr, bitmask[0] & nfs4_fs_locations_bitmap[0],
+ bitmask[1] & nfs4_fs_locations_bitmap[1], hdr);
}
-static int encode_getfh(struct xdr_stream *xdr, struct compound_hdr *hdr)
+static void encode_getfh(struct xdr_stream *xdr, struct compound_hdr *hdr)
{
__be32 *p;
RESERVE_SPACE(4);
WRITE32(OP_GETFH);
hdr->nops++;
-
- return 0;
}
-static int encode_link(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
+static void encode_link(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(name->len);
WRITEMEM(name->name, name->len);
hdr->nops++;
-
- return 0;
}
static inline int nfs4_lock_type(struct file_lock *fl, int block)
* opcode,type,reclaim,offset,length,new_lock_owner = 32
* open_seqid,open_stateid,lock_seqid,lock_owner.clientid, lock_owner.id = 40
*/
-static int encode_lock(struct xdr_stream *xdr, const struct nfs_lock_args *args, struct compound_hdr *hdr)
+static void encode_lock(struct xdr_stream *xdr, const struct nfs_lock_args *args, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(args->lock_seqid->sequence->counter);
}
hdr->nops++;
-
- return 0;
}
-static int encode_lockt(struct xdr_stream *xdr, const struct nfs_lockt_args *args, struct compound_hdr *hdr)
+static void encode_lockt(struct xdr_stream *xdr, const struct nfs_lockt_args *args, struct compound_hdr *hdr)
{
__be32 *p;
WRITEMEM("lock id:", 8);
WRITE64(args->lock_owner.id);
hdr->nops++;
-
- return 0;
}
-static int encode_locku(struct xdr_stream *xdr, const struct nfs_locku_args *args, struct compound_hdr *hdr)
+static void encode_locku(struct xdr_stream *xdr, const struct nfs_locku_args *args, struct compound_hdr *hdr)
{
__be32 *p;
WRITE64(args->fl->fl_start);
WRITE64(nfs4_lock_length(args->fl));
hdr->nops++;
-
- return 0;
}
-static int encode_lookup(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
+static void encode_lookup(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
{
int len = name->len;
__be32 *p;
WRITE32(len);
WRITEMEM(name->name, len);
hdr->nops++;
-
- return 0;
}
static void encode_share_access(struct xdr_stream *xdr, fmode_t fmode)
encode_string(xdr, name->len, name->name);
}
-static int encode_open(struct xdr_stream *xdr, const struct nfs_openargs *arg, struct compound_hdr *hdr)
+static void encode_open(struct xdr_stream *xdr, const struct nfs_openargs *arg, struct compound_hdr *hdr)
{
encode_openhdr(xdr, arg);
encode_opentype(xdr, arg);
BUG();
}
hdr->nops++;
- return 0;
}
-static int encode_open_confirm(struct xdr_stream *xdr, const struct nfs_open_confirmargs *arg, struct compound_hdr *hdr)
+static void encode_open_confirm(struct xdr_stream *xdr, const struct nfs_open_confirmargs *arg, struct compound_hdr *hdr)
{
__be32 *p;
WRITEMEM(arg->stateid->data, NFS4_STATEID_SIZE);
WRITE32(arg->seqid->sequence->counter);
hdr->nops++;
-
- return 0;
}
-static int encode_open_downgrade(struct xdr_stream *xdr, const struct nfs_closeargs *arg, struct compound_hdr *hdr)
+static void encode_open_downgrade(struct xdr_stream *xdr, const struct nfs_closeargs *arg, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(arg->seqid->sequence->counter);
encode_share_access(xdr, arg->fmode);
hdr->nops++;
- return 0;
}
-static int
+static void
encode_putfh(struct xdr_stream *xdr, const struct nfs_fh *fh, struct compound_hdr *hdr)
{
int len = fh->size;
WRITE32(len);
WRITEMEM(fh->data, len);
hdr->nops++;
-
- return 0;
}
-static int encode_putrootfh(struct xdr_stream *xdr, struct compound_hdr *hdr)
+static void encode_putrootfh(struct xdr_stream *xdr, struct compound_hdr *hdr)
{
__be32 *p;
RESERVE_SPACE(4);
WRITE32(OP_PUTROOTFH);
hdr->nops++;
-
- return 0;
}
static void encode_stateid(struct xdr_stream *xdr, const struct nfs_open_context *ctx)
WRITEMEM(zero_stateid.data, NFS4_STATEID_SIZE);
}
-static int encode_read(struct xdr_stream *xdr, const struct nfs_readargs *args, struct compound_hdr *hdr)
+static void encode_read(struct xdr_stream *xdr, const struct nfs_readargs *args, struct compound_hdr *hdr)
{
__be32 *p;
WRITE64(args->offset);
WRITE32(args->count);
hdr->nops++;
-
- return 0;
}
-static int encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg *readdir, struct rpc_rqst *req, struct compound_hdr *hdr)
+static void encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg *readdir, struct rpc_rqst *req, struct compound_hdr *hdr)
{
uint32_t attrs[2] = {
FATTR4_WORD0_RDATTR_ERROR|FATTR4_WORD0_FILEID,
((u32 *)readdir->verifier.data)[1],
attrs[0] & readdir->bitmask[0],
attrs[1] & readdir->bitmask[1]);
-
- return 0;
}
-static int encode_readlink(struct xdr_stream *xdr, const struct nfs4_readlink *readlink, struct rpc_rqst *req, struct compound_hdr *hdr)
+static void encode_readlink(struct xdr_stream *xdr, const struct nfs4_readlink *readlink, struct rpc_rqst *req, struct compound_hdr *hdr)
{
__be32 *p;
RESERVE_SPACE(4);
WRITE32(OP_READLINK);
hdr->nops++;
-
- return 0;
}
-static int encode_remove(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
+static void encode_remove(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(name->len);
WRITEMEM(name->name, name->len);
hdr->nops++;
-
- return 0;
}
-static int encode_rename(struct xdr_stream *xdr, const struct qstr *oldname, const struct qstr *newname, struct compound_hdr *hdr)
+static void encode_rename(struct xdr_stream *xdr, const struct qstr *oldname, const struct qstr *newname, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(newname->len);
WRITEMEM(newname->name, newname->len);
hdr->nops++;
-
- return 0;
}
-static int encode_renew(struct xdr_stream *xdr, const struct nfs_client *client_stateid, struct compound_hdr *hdr)
+static void encode_renew(struct xdr_stream *xdr, const struct nfs_client *client_stateid, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(OP_RENEW);
WRITE64(client_stateid->cl_clientid);
hdr->nops++;
-
- return 0;
}
-static int
+static void
encode_restorefh(struct xdr_stream *xdr, struct compound_hdr *hdr)
{
__be32 *p;
RESERVE_SPACE(4);
WRITE32(OP_RESTOREFH);
hdr->nops++;
-
- return 0;
}
static int
return 0;
}
-static int
+static void
encode_savefh(struct xdr_stream *xdr, struct compound_hdr *hdr)
{
__be32 *p;
RESERVE_SPACE(4);
WRITE32(OP_SAVEFH);
hdr->nops++;
-
- return 0;
}
-static int encode_setattr(struct xdr_stream *xdr, const struct nfs_setattrargs *arg, const struct nfs_server *server, struct compound_hdr *hdr)
+static void encode_setattr(struct xdr_stream *xdr, const struct nfs_setattrargs *arg, const struct nfs_server *server, struct compound_hdr *hdr)
{
- int status;
__be32 *p;
RESERVE_SPACE(4+NFS4_STATEID_SIZE);
WRITE32(OP_SETATTR);
WRITEMEM(arg->stateid.data, NFS4_STATEID_SIZE);
hdr->nops++;
-
- if ((status = encode_attrs(xdr, arg->iap, server)))
- return status;
-
- return 0;
+ encode_attrs(xdr, arg->iap, server);
}
-static int encode_setclientid(struct xdr_stream *xdr, const struct nfs4_setclientid *setclientid, struct compound_hdr *hdr)
+static void encode_setclientid(struct xdr_stream *xdr, const struct nfs4_setclientid *setclientid, struct compound_hdr *hdr)
{
__be32 *p;
RESERVE_SPACE(4);
WRITE32(setclientid->sc_cb_ident);
hdr->nops++;
-
- return 0;
}
-static int encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs_client *client_state, struct compound_hdr *hdr)
+static void encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs_client *client_state, struct compound_hdr *hdr)
{
__be32 *p;
WRITE64(client_state->cl_clientid);
WRITEMEM(client_state->cl_confirm.data, NFS4_VERIFIER_SIZE);
hdr->nops++;
-
- return 0;
}
-static int encode_write(struct xdr_stream *xdr, const struct nfs_writeargs *args, struct compound_hdr *hdr)
+static void encode_write(struct xdr_stream *xdr, const struct nfs_writeargs *args, struct compound_hdr *hdr)
{
__be32 *p;
xdr_write_pages(xdr, args->pages, args->pgbase, args->count);
hdr->nops++;
-
- return 0;
}
-static int encode_delegreturn(struct xdr_stream *xdr, const nfs4_stateid *stateid, struct compound_hdr *hdr)
+static void encode_delegreturn(struct xdr_stream *xdr, const nfs4_stateid *stateid, struct compound_hdr *hdr)
{
__be32 *p;
WRITE32(OP_DELEGRETURN);
WRITEMEM(stateid->data, NFS4_STATEID_SIZE);
hdr->nops++;
- return 0;
-
}
/*
* END OF "GENERIC" ENCODE ROUTINES.
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (status != 0)
- goto out;
- status = encode_access(&xdr, args->access, &hdr);
- if (status != 0)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_access(&xdr, args->access, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- if ((status = encode_putfh(&xdr, args->dir_fh, &hdr)) != 0)
- goto out;
- if ((status = encode_lookup(&xdr, args->name, &hdr)) != 0)
- goto out;
- if ((status = encode_getfh(&xdr, &hdr)) != 0)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->dir_fh, &hdr);
+ encode_lookup(&xdr, args->name, &hdr);
+ encode_getfh(&xdr, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- if ((status = encode_putrootfh(&xdr, &hdr)) != 0)
- goto out;
- if ((status = encode_getfh(&xdr, &hdr)) == 0)
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putrootfh(&xdr, &hdr);
+ encode_getfh(&xdr, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- if ((status = encode_putfh(&xdr, args->fh, &hdr)) != 0)
- goto out;
- if ((status = encode_remove(&xdr, &args->name, &hdr)) != 0)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_remove(&xdr, &args->name, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- if ((status = encode_putfh(&xdr, args->old_dir, &hdr)) != 0)
- goto out;
- if ((status = encode_savefh(&xdr, &hdr)) != 0)
- goto out;
- if ((status = encode_putfh(&xdr, args->new_dir, &hdr)) != 0)
- goto out;
- if ((status = encode_rename(&xdr, args->old_name, args->new_name,
- &hdr)) != 0)
- goto out;
- if ((status = encode_getfattr(&xdr, args->bitmask, &hdr)) != 0)
- goto out;
- if ((status = encode_restorefh(&xdr, &hdr)) != 0)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->old_dir, &hdr);
+ encode_savefh(&xdr, &hdr);
+ encode_putfh(&xdr, args->new_dir, &hdr);
+ encode_rename(&xdr, args->old_name, args->new_name, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
+ encode_restorefh(&xdr, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- if ((status = encode_putfh(&xdr, args->fh, &hdr)) != 0)
- goto out;
- if ((status = encode_savefh(&xdr, &hdr)) != 0)
- goto out;
- if ((status = encode_putfh(&xdr, args->dir_fh, &hdr)) != 0)
- goto out;
- if ((status = encode_link(&xdr, args->name, &hdr)) != 0)
- goto out;
- if ((status = encode_getfattr(&xdr, args->bitmask, &hdr)) != 0)
- goto out;
- if ((status = encode_restorefh(&xdr, &hdr)) != 0)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_savefh(&xdr, &hdr);
+ encode_putfh(&xdr, args->dir_fh, &hdr);
+ encode_link(&xdr, args->name, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
+ encode_restorefh(&xdr, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- if ((status = encode_putfh(&xdr, args->dir_fh, &hdr)) != 0)
- goto out;
- if ((status = encode_savefh(&xdr, &hdr)) != 0)
- goto out;
- if ((status = encode_create(&xdr, args, &hdr)) != 0)
- goto out;
- if ((status = encode_getfh(&xdr, &hdr)) != 0)
- goto out;
- if ((status = encode_getfattr(&xdr, args->bitmask, &hdr)) != 0)
- goto out;
- if ((status = encode_restorefh(&xdr, &hdr)) != 0)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->dir_fh, &hdr);
+ encode_savefh(&xdr, &hdr);
+ encode_create(&xdr, args, &hdr);
+ encode_getfh(&xdr, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
+ encode_restorefh(&xdr, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- if ((status = encode_putfh(&xdr, args->fh, &hdr)) == 0)
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if(status)
- goto out;
- status = encode_close(&xdr, args, &hdr);
- if (status != 0)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_close(&xdr, args, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (status)
- goto out;
- status = encode_savefh(&xdr, &hdr);
- if (status)
- goto out;
- status = encode_open(&xdr, args, &hdr);
- if (status)
- goto out;
- status = encode_getfh(&xdr, &hdr);
- if (status)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
- if (status)
- goto out;
- status = encode_restorefh(&xdr, &hdr);
- if (status)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_savefh(&xdr, &hdr);
+ encode_open(&xdr, args, &hdr);
+ encode_getfh(&xdr, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
+ encode_restorefh(&xdr, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if(status)
- goto out;
- status = encode_open_confirm(&xdr, args, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_open_confirm(&xdr, args, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (status)
- goto out;
- status = encode_open(&xdr, args, &hdr);
- if (status)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_open(&xdr, args, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (status)
- goto out;
- status = encode_open_downgrade(&xdr, args, &hdr);
- if (status != 0)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_open_downgrade(&xdr, args, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if(status)
- goto out;
- status = encode_lock(&xdr, args, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_lock(&xdr, args, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if(status)
- goto out;
- status = encode_lockt(&xdr, args, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_lockt(&xdr, args, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if(status)
- goto out;
- status = encode_locku(&xdr, args, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_locku(&xdr, args, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
};
struct rpc_auth *auth = req->rq_task->tk_msg.rpc_cred->cr_auth;
unsigned int replen;
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if(status)
- goto out;
- status = encode_readlink(&xdr, args, req, &hdr);
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_readlink(&xdr, args, req, &hdr);
/* set up reply kvec
* toplevel_status + taglen + rescount + OP_PUTFH + status
replen = (RPC_REPHDRSIZE + auth->au_rslack + NFS4_dec_readlink_sz) << 2;
xdr_inline_pages(&req->rq_rcv_buf, replen, args->pages,
args->pgbase, args->pglen);
-
-out:
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
};
struct rpc_auth *auth = req->rq_task->tk_msg.rpc_cred->cr_auth;
int replen;
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if(status)
- goto out;
- status = encode_readdir(&xdr, args, req, &hdr);
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_readdir(&xdr, args, req, &hdr);
/* set up reply kvec
* toplevel_status + taglen + rescount + OP_PUTFH + status
dprintk("%s: inlined page args = (%u, %p, %u, %u)\n",
__func__, replen, args->pages,
args->pgbase, args->count);
-
-out:
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int replen, status;
+ int replen;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (status)
- goto out;
- status = encode_read(&xdr, args, &hdr);
- if (status)
- goto out;
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_read(&xdr, args, &hdr);
/* set up reply kvec
* toplevel status + taglen=0 + rescount + OP_PUTFH + status
xdr_inline_pages(&req->rq_rcv_buf, replen,
args->pages, args->pgbase, args->count);
req->rq_rcv_buf.flags |= XDRBUF_READ;
-out:
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if(status)
- goto out;
- status = encode_setattr(&xdr, args, args->server, &hdr);
- if(status)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_setattr(&xdr, args, args->server, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int replen, status;
+ int replen;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (status)
- goto out;
- status = encode_getattr_two(&xdr, FATTR4_WORD0_ACL, 0, &hdr);
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_getattr_two(&xdr, FATTR4_WORD0_ACL, 0, &hdr);
+
/* set up reply buffer: */
replen = (RPC_REPHDRSIZE + auth->au_rslack + NFS4_dec_getacl_sz) << 2;
xdr_inline_pages(&req->rq_rcv_buf, replen,
args->acl_pages, args->acl_pgbase, args->acl_len);
-out:
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (status)
- goto out;
- status = encode_write(&xdr, args, &hdr);
- if (status)
- goto out;
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_write(&xdr, args, &hdr);
req->rq_snd_buf.flags |= XDRBUF_WRITE;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (status)
- goto out;
- status = encode_commit(&xdr, args, &hdr);
- if (status)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_commit(&xdr, args, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (!status)
- status = encode_fsinfo(&xdr, args->bitmask, &hdr);
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_fsinfo(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (!status)
- status = encode_getattr_one(&xdr,
- args->bitmask[0] & nfs4_pathconf_bitmap[0],
- &hdr);
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_getattr_one(&xdr, args->bitmask[0] & nfs4_pathconf_bitmap[0],
+ &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (status == 0)
- status = encode_getattr_two(&xdr,
- args->bitmask[0] & nfs4_statfs_bitmap[0],
- args->bitmask[1] & nfs4_statfs_bitmap[1], &hdr);
+ encode_putfh(&xdr, args->fh, &hdr);
+ encode_getattr_two(&xdr, args->bitmask[0] & nfs4_statfs_bitmap[0],
+ args->bitmask[1] & nfs4_statfs_bitmap[1], &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, fhandle, &hdr);
- if (status == 0)
- status = encode_getattr_one(&xdr, FATTR4_WORD0_SUPPORTED_ATTRS|
- FATTR4_WORD0_LINK_SUPPORT|
- FATTR4_WORD0_SYMLINK_SUPPORT|
- FATTR4_WORD0_ACLSUPPORT, &hdr);
+ encode_putfh(&xdr, fhandle, &hdr);
+ encode_getattr_one(&xdr, FATTR4_WORD0_SUPPORTED_ATTRS|
+ FATTR4_WORD0_LINK_SUPPORT|
+ FATTR4_WORD0_SYMLINK_SUPPORT|
+ FATTR4_WORD0_ACLSUPPORT, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_renew(&xdr, clp, &hdr);
+ encode_renew(&xdr, clp, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_setclientid(&xdr, sc, &hdr);
+ encode_setclientid(&xdr, sc, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
.nops = 0,
};
const u32 lease_bitmap[2] = { FATTR4_WORD0_LEASE_TIME, 0 };
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_setclientid_confirm(&xdr, clp, &hdr);
- if (!status)
- status = encode_putrootfh(&xdr, &hdr);
- if (!status)
- status = encode_fsinfo(&xdr, lease_bitmap, &hdr);
+ encode_setclientid_confirm(&xdr, clp, &hdr);
+ encode_putrootfh(&xdr, &hdr);
+ encode_fsinfo(&xdr, lease_bitmap, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
struct compound_hdr hdr = {
.nops = 0,
};
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fhandle, &hdr);
- if (status != 0)
- goto out;
- status = encode_delegreturn(&xdr, args->stateid, &hdr);
- if (status != 0)
- goto out;
- status = encode_getfattr(&xdr, args->bitmask, &hdr);
-out:
+ encode_putfh(&xdr, args->fhandle, &hdr);
+ encode_delegreturn(&xdr, args->stateid, &hdr);
+ encode_getfattr(&xdr, args->bitmask, &hdr);
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
};
struct rpc_auth *auth = req->rq_task->tk_msg.rpc_cred->cr_auth;
int replen;
- int status;
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- if ((status = encode_putfh(&xdr, args->dir_fh, &hdr)) != 0)
- goto out;
- if ((status = encode_lookup(&xdr, args->name, &hdr)) != 0)
- goto out;
- if ((status = encode_fs_locations(&xdr, args->bitmask, &hdr)) != 0)
- goto out;
+ encode_putfh(&xdr, args->dir_fh, &hdr);
+ encode_lookup(&xdr, args->name, &hdr);
+ encode_fs_locations(&xdr, args->bitmask, &hdr);
+
/* set up reply
* toplevel_status + OP_PUTFH + status
* + OP_LOOKUP + status + OP_GETATTR + status = 7
replen = (RPC_REPHDRSIZE + auth->au_rslack + 7) << 2;
xdr_inline_pages(&req->rq_rcv_buf, replen, &args->page,
0, PAGE_SIZE);
-out:
encode_nops(&hdr);
- return status;
+ return 0;
}
/*
xdr_init_encode(&xdr, &req->rq_snd_buf, p);
encode_compound_hdr(&xdr, &hdr);
- status = encode_putfh(&xdr, args->fh, &hdr);
- if (status)
- goto out;
+ encode_putfh(&xdr, args->fh, &hdr);
status = encode_setacl(&xdr, args, &hdr);
-out:
encode_nops(&hdr);
return status;
}