#include <linux/time.h>
#include <linux/mm.h>
#include <linux/slab.h>
-#include <linux/utsname.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/in.h>
encode_compound_hdr(&xdr, req, &hdr);
encode_sequence(&xdr, &args->seq_args, &hdr);
encode_putfh(&xdr, args->fh, &hdr);
- replen = hdr.replen + nfs4_fattr_bitmap_maxsz + 1;
+ replen = hdr.replen + op_decode_hdr_maxsz + nfs4_fattr_bitmap_maxsz + 1;
encode_getattr_two(&xdr, FATTR4_WORD0_ACL, 0, &hdr);
xdr_inline_pages(&req->rq_rcv_buf, replen << 2,
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- *len = be32_to_cpup(p++);
+ *len = be32_to_cpup(p);
p = xdr_inline_decode(xdr, *len);
if (unlikely(!p))
goto out_overflow;
if (unlikely(!p))
goto out_overflow;
hdr->status = be32_to_cpup(p++);
- hdr->taglen = be32_to_cpup(p++);
+ hdr->taglen = be32_to_cpup(p);
p = xdr_inline_decode(xdr, hdr->taglen + 4);
if (unlikely(!p))
goto out_overflow;
hdr->tag = (char *)p;
p += XDR_QUADLEN(hdr->taglen);
- hdr->nops = be32_to_cpup(p++);
+ hdr->nops = be32_to_cpup(p);
if (unlikely(hdr->nops < 1))
return nfs4_stat_to_errno(hdr->status);
return 0;
opnum, expected);
return -EIO;
}
- nfserr = be32_to_cpup(p++);
+ nfserr = be32_to_cpup(p);
if (nfserr != NFS_OK)
return nfs4_stat_to_errno(nfserr);
return 0;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- bmlen = be32_to_cpup(p++);
+ bmlen = be32_to_cpup(p);
bitmap[0] = bitmap[1] = 0;
p = xdr_inline_decode(xdr, (bmlen << 2));
if (bmlen > 0) {
bitmap[0] = be32_to_cpup(p++);
if (bmlen > 1)
- bitmap[1] = be32_to_cpup(p++);
+ bitmap[1] = be32_to_cpup(p);
}
return 0;
out_overflow:
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- *attrlen = be32_to_cpup(p++);
+ *attrlen = be32_to_cpup(p);
*savep = xdr->p;
return 0;
out_overflow:
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- *type = be32_to_cpup(p++);
+ *type = be32_to_cpup(p);
if (*type < NF4REG || *type > NF4NAMEDATTR) {
dprintk("%s: bad type %d\n", __func__, *type);
return -EIO;
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, change);
+ xdr_decode_hyper(p, change);
bitmap[0] &= ~FATTR4_WORD0_CHANGE;
ret = NFS_ATTR_FATTR_CHANGE;
}
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, size);
+ xdr_decode_hyper(p, size);
bitmap[0] &= ~FATTR4_WORD0_SIZE;
ret = NFS_ATTR_FATTR_SIZE;
}
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- *res = be32_to_cpup(p++);
+ *res = be32_to_cpup(p);
bitmap[0] &= ~FATTR4_WORD0_LINK_SUPPORT;
}
dprintk("%s: link support=%s\n", __func__, *res == 0 ? "false" : "true");
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- *res = be32_to_cpup(p++);
+ *res = be32_to_cpup(p);
bitmap[0] &= ~FATTR4_WORD0_SYMLINK_SUPPORT;
}
dprintk("%s: symlink support=%s\n", __func__, *res == 0 ? "false" : "true");
if (unlikely(!p))
goto out_overflow;
p = xdr_decode_hyper(p, &fsid->major);
- p = xdr_decode_hyper(p, &fsid->minor);
+ xdr_decode_hyper(p, &fsid->minor);
bitmap[0] &= ~FATTR4_WORD0_FSID;
ret = NFS_ATTR_FATTR_FSID;
}
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- *res = be32_to_cpup(p++);
+ *res = be32_to_cpup(p);
bitmap[0] &= ~FATTR4_WORD0_LEASE_TIME;
}
dprintk("%s: file size=%u\n", __func__, (unsigned int)*res);
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- *res = be32_to_cpup(p++);
+ *res = be32_to_cpup(p);
bitmap[0] &= ~FATTR4_WORD0_ACLSUPPORT;
}
dprintk("%s: ACLs supported=%u\n", __func__, (unsigned int)*res);
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, fileid);
+ xdr_decode_hyper(p, fileid);
bitmap[0] &= ~FATTR4_WORD0_FILEID;
ret = NFS_ATTR_FATTR_FILEID;
}
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, fileid);
+ xdr_decode_hyper(p, fileid);
bitmap[1] &= ~FATTR4_WORD1_MOUNTED_ON_FILEID;
ret = NFS_ATTR_FATTR_FILEID;
}
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, res);
+ xdr_decode_hyper(p, res);
bitmap[0] &= ~FATTR4_WORD0_FILES_AVAIL;
}
dprintk("%s: files avail=%Lu\n", __func__, (unsigned long long)*res);
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, res);
+ xdr_decode_hyper(p, res);
bitmap[0] &= ~FATTR4_WORD0_FILES_FREE;
}
dprintk("%s: files free=%Lu\n", __func__, (unsigned long long)*res);
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, res);
+ xdr_decode_hyper(p, res);
bitmap[0] &= ~FATTR4_WORD0_FILES_TOTAL;
}
dprintk("%s: files total=%Lu\n", __func__, (unsigned long long)*res);
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- n = be32_to_cpup(p++);
+ n = be32_to_cpup(p);
if (n == 0)
goto root_path;
dprintk("path ");
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- n = be32_to_cpup(p++);
+ n = be32_to_cpup(p);
if (n <= 0)
goto out_eio;
res->nlocations = 0;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- m = be32_to_cpup(p++);
+ m = be32_to_cpup(p);
loc->nservers = 0;
dprintk("%s: servers ", __func__);
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, res);
+ xdr_decode_hyper(p, res);
bitmap[0] &= ~FATTR4_WORD0_MAXFILESIZE;
}
dprintk("%s: maxfilesize=%Lu\n", __func__, (unsigned long long)*res);
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- *maxlink = be32_to_cpup(p++);
+ *maxlink = be32_to_cpup(p);
bitmap[0] &= ~FATTR4_WORD0_MAXLINK;
}
dprintk("%s: maxlink=%u\n", __func__, *maxlink);
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- *maxname = be32_to_cpup(p++);
+ *maxname = be32_to_cpup(p);
bitmap[0] &= ~FATTR4_WORD0_MAXNAME;
}
dprintk("%s: maxname=%u\n", __func__, *maxname);
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, &maxread);
+ xdr_decode_hyper(p, &maxread);
if (maxread > 0x7FFFFFFF)
maxread = 0x7FFFFFFF;
*res = (uint32_t)maxread;
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, &maxwrite);
+ xdr_decode_hyper(p, &maxwrite);
if (maxwrite > 0x7FFFFFFF)
maxwrite = 0x7FFFFFFF;
*res = (uint32_t)maxwrite;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- tmp = be32_to_cpup(p++);
+ tmp = be32_to_cpup(p);
*mode = tmp & ~S_IFMT;
bitmap[1] &= ~FATTR4_WORD1_MODE;
ret = NFS_ATTR_FATTR_MODE;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- *nlink = be32_to_cpup(p++);
+ *nlink = be32_to_cpup(p);
bitmap[1] &= ~FATTR4_WORD1_NUMLINKS;
ret = NFS_ATTR_FATTR_NLINK;
}
return -EIO;
}
-static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, uint32_t *uid)
+static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap,
+ struct nfs_client *clp, uint32_t *uid, int may_sleep)
{
uint32_t len;
__be32 *p;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- len = be32_to_cpup(p++);
+ len = be32_to_cpup(p);
p = xdr_inline_decode(xdr, len);
if (unlikely(!p))
goto out_overflow;
- if (len < XDR_MAX_NETOBJ) {
+ if (!may_sleep) {
+ /* do nothing */
+ } else if (len < XDR_MAX_NETOBJ) {
if (nfs_map_name_to_uid(clp, (char *)p, len, uid) == 0)
ret = NFS_ATTR_FATTR_OWNER;
else
return -EIO;
}
-static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, uint32_t *gid)
+static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap,
+ struct nfs_client *clp, uint32_t *gid, int may_sleep)
{
uint32_t len;
__be32 *p;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- len = be32_to_cpup(p++);
+ len = be32_to_cpup(p);
p = xdr_inline_decode(xdr, len);
if (unlikely(!p))
goto out_overflow;
- if (len < XDR_MAX_NETOBJ) {
+ if (!may_sleep) {
+ /* do nothing */
+ } else if (len < XDR_MAX_NETOBJ) {
if (nfs_map_group_to_gid(clp, (char *)p, len, gid) == 0)
ret = NFS_ATTR_FATTR_GROUP;
else
if (unlikely(!p))
goto out_overflow;
major = be32_to_cpup(p++);
- minor = be32_to_cpup(p++);
+ minor = be32_to_cpup(p);
tmp = MKDEV(major, minor);
if (MAJOR(tmp) == major && MINOR(tmp) == minor)
*rdev = tmp;
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, res);
+ xdr_decode_hyper(p, res);
bitmap[1] &= ~FATTR4_WORD1_SPACE_AVAIL;
}
dprintk("%s: space avail=%Lu\n", __func__, (unsigned long long)*res);
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, res);
+ xdr_decode_hyper(p, res);
bitmap[1] &= ~FATTR4_WORD1_SPACE_FREE;
}
dprintk("%s: space free=%Lu\n", __func__, (unsigned long long)*res);
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, res);
+ xdr_decode_hyper(p, res);
bitmap[1] &= ~FATTR4_WORD1_SPACE_TOTAL;
}
dprintk("%s: space total=%Lu\n", __func__, (unsigned long long)*res);
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, used);
+ xdr_decode_hyper(p, used);
bitmap[1] &= ~FATTR4_WORD1_SPACE_USED;
ret = NFS_ATTR_FATTR_SPACE_USED;
}
if (unlikely(!p))
goto out_overflow;
p = xdr_decode_hyper(p, &sec);
- nsec = be32_to_cpup(p++);
+ nsec = be32_to_cpup(p);
time->tv_sec = (time_t)sec;
time->tv_nsec = (long)nsec;
return 0;
goto out_overflow;
cinfo->atomic = be32_to_cpup(p++);
p = xdr_decode_hyper(p, &cinfo->before);
- p = xdr_decode_hyper(p, &cinfo->after);
+ xdr_decode_hyper(p, &cinfo->after);
return 0;
out_overflow:
print_overflow_msg(__func__, xdr);
if (unlikely(!p))
goto out_overflow;
supp = be32_to_cpup(p++);
- acc = be32_to_cpup(p++);
+ acc = be32_to_cpup(p);
access->supported = supp;
access->access = acc;
return 0;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- bmlen = be32_to_cpup(p++);
+ bmlen = be32_to_cpup(p);
p = xdr_inline_decode(xdr, bmlen << 2);
if (likely(p))
return 0;
return status;
}
-static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr, const struct nfs_server *server)
+static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr,
+ const struct nfs_server *server, int may_sleep)
{
__be32 *savep;
uint32_t attrlen,
goto xdr_error;
fattr->valid |= status;
- status = decode_attr_owner(xdr, bitmap, server->nfs_client, &fattr->uid);
+ status = decode_attr_owner(xdr, bitmap, server->nfs_client,
+ &fattr->uid, may_sleep);
if (status < 0)
goto xdr_error;
fattr->valid |= status;
- status = decode_attr_group(xdr, bitmap, server->nfs_client, &fattr->gid);
+ status = decode_attr_group(xdr, bitmap, server->nfs_client,
+ &fattr->gid, may_sleep);
if (status < 0)
goto xdr_error;
fattr->valid |= status;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- len = be32_to_cpup(p++);
+ len = be32_to_cpup(p);
if (len > NFS4_FHSIZE)
return -EIO;
fh->size = len;
fl->fl_pid = 0;
}
p = xdr_decode_hyper(p, &clientid);
- namelen = be32_to_cpup(p++);
+ namelen = be32_to_cpup(p);
p = xdr_inline_decode(xdr, namelen);
if (likely(p))
return -NFS4ERR_DENIED;
limit_type = be32_to_cpup(p++);
switch (limit_type) {
case 1:
- p = xdr_decode_hyper(p, maxsize);
+ xdr_decode_hyper(p, maxsize);
break;
case 2:
nblocks = be32_to_cpup(p++);
- blocksize = be32_to_cpup(p++);
+ blocksize = be32_to_cpup(p);
*maxsize = (uint64_t)nblocks * (uint64_t)blocksize;
}
return 0;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- delegation_type = be32_to_cpup(p++);
+ delegation_type = be32_to_cpup(p);
if (delegation_type == NFS4_OPEN_DELEGATE_NONE) {
res->delegation_type = 0;
return 0;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- res->do_recall = be32_to_cpup(p++);
+ res->do_recall = be32_to_cpup(p);
switch (delegation_type) {
case NFS4_OPEN_DELEGATE_READ:
if (unlikely(!p))
goto out_overflow;
res->rflags = be32_to_cpup(p++);
- bmlen = be32_to_cpup(p++);
+ bmlen = be32_to_cpup(p);
if (bmlen > 10)
goto xdr_error;
if (unlikely(!p))
goto out_overflow;
eof = be32_to_cpup(p++);
- count = be32_to_cpup(p++);
+ count = be32_to_cpup(p);
hdrlen = (u8 *) p - (u8 *) iov->iov_base;
recvd = req->rq_rcv_buf.len - hdrlen;
if (count > recvd) {
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- len = be32_to_cpup(p++);
+ len = be32_to_cpup(p);
if (len >= rcvbuf->page_len || len <= 0) {
dprintk("nfs: server returned giant symlink!\n");
return -ENAMETOOLONG;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- bmlen = be32_to_cpup(p++);
+ bmlen = be32_to_cpup(p);
p = xdr_inline_decode(xdr, bmlen << 2);
if (likely(p))
return 0;
" %d\n", opnum);
return -EIO;
}
- nfserr = be32_to_cpup(p++);
+ nfserr = be32_to_cpup(p);
if (nfserr == NFS_OK) {
p = xdr_inline_decode(xdr, 8 + NFS4_VERIFIER_SIZE);
if (unlikely(!p))
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- len = be32_to_cpup(p++);
+ len = be32_to_cpup(p);
p = xdr_inline_decode(xdr, len);
if (unlikely(!p))
goto out_overflow;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
- len = be32_to_cpup(p++);
+ len = be32_to_cpup(p);
p = xdr_inline_decode(xdr, len);
if (unlikely(!p))
goto out_overflow;
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
- p = xdr_decode_hyper(p, &clp->cl_ex_clid);
+ xdr_decode_hyper(p, &clp->cl_ex_clid);
p = xdr_inline_decode(xdr, 12);
if (unlikely(!p))
goto out_overflow;
clp->cl_exchange_flags = be32_to_cpup(p++);
/* We ask for SP4_NONE */
- dummy = be32_to_cpup(p++);
+ dummy = be32_to_cpup(p);
if (dummy != SP4_NONE)
return -EIO;
attrs->max_resp_sz_cached = be32_to_cpup(p++);
attrs->max_ops = be32_to_cpup(p++);
attrs->max_reqs = be32_to_cpup(p++);
- nr_attrs = be32_to_cpup(p++);
+ nr_attrs = be32_to_cpup(p);
if (unlikely(nr_attrs > 1)) {
printk(KERN_WARNING "%s: Invalid rdma channel attrs count %u\n",
__func__, nr_attrs);
if (unlikely(!p))
goto out_overflow;
clp->cl_seqid = be32_to_cpup(p++);
- session->flags = be32_to_cpup(p++);
+ session->flags = be32_to_cpup(p);
/* Channel attributes */
status = decode_chan_attrs(xdr, &session->fc_attrs);
/* target highest slot id - currently not processed */
dummy = be32_to_cpup(p++);
/* result flags - currently not processed */
- dummy = be32_to_cpup(p++);
+ dummy = be32_to_cpup(p);
status = 0;
out_err:
res->sr_status = status;
status = decode_open_downgrade(&xdr, res);
if (status != 0)
goto out;
- decode_getfattr(&xdr, res->fattr, res->server);
+ decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
status = decode_access(&xdr, res);
if (status != 0)
goto out;
- decode_getfattr(&xdr, res->fattr, res->server);
+ decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
goto out;
if ((status = decode_getfh(&xdr, res->fh)) != 0)
goto out;
- status = decode_getfattr(&xdr, res->fattr, res->server);
+ status = decode_getfattr(&xdr, res->fattr, res->server
+ ,!RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
if ((status = decode_putrootfh(&xdr)) != 0)
goto out;
if ((status = decode_getfh(&xdr, res->fh)) == 0)
- status = decode_getfattr(&xdr, res->fattr, res->server);
+ status = decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
goto out;
if ((status = decode_remove(&xdr, &res->cinfo)) != 0)
goto out;
- decode_getfattr(&xdr, &res->dir_attr, res->server);
+ decode_getfattr(&xdr, &res->dir_attr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
if ((status = decode_rename(&xdr, &res->old_cinfo, &res->new_cinfo)) != 0)
goto out;
/* Current FH is target directory */
- if (decode_getfattr(&xdr, res->new_fattr, res->server) != 0)
+ if (decode_getfattr(&xdr, res->new_fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task)) != 0)
goto out;
if ((status = decode_restorefh(&xdr)) != 0)
goto out;
- decode_getfattr(&xdr, res->old_fattr, res->server);
+ decode_getfattr(&xdr, res->old_fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
* Note order: OP_LINK leaves the directory as the current
* filehandle.
*/
- if (decode_getfattr(&xdr, res->dir_attr, res->server) != 0)
+ if (decode_getfattr(&xdr, res->dir_attr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task)) != 0)
goto out;
if ((status = decode_restorefh(&xdr)) != 0)
goto out;
- decode_getfattr(&xdr, res->fattr, res->server);
+ decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
goto out;
if ((status = decode_getfh(&xdr, res->fh)) != 0)
goto out;
- if (decode_getfattr(&xdr, res->fattr, res->server) != 0)
+ if (decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task)) != 0)
goto out;
if ((status = decode_restorefh(&xdr)) != 0)
goto out;
- decode_getfattr(&xdr, res->dir_fattr, res->server);
+ decode_getfattr(&xdr, res->dir_fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
status = decode_putfh(&xdr);
if (status)
goto out;
- status = decode_getfattr(&xdr, res->fattr, res->server);
+ status = decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
* an ESTALE error. Shouldn't be a problem,
* though, since fattr->valid will remain unset.
*/
- decode_getfattr(&xdr, res->fattr, res->server);
+ decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
goto out;
if (decode_getfh(&xdr, &res->fh) != 0)
goto out;
- if (decode_getfattr(&xdr, res->f_attr, res->server) != 0)
+ if (decode_getfattr(&xdr, res->f_attr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task)) != 0)
goto out;
if (decode_restorefh(&xdr) != 0)
goto out;
- decode_getfattr(&xdr, res->dir_attr, res->server);
+ decode_getfattr(&xdr, res->dir_attr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
status = decode_open(&xdr, res);
if (status)
goto out;
- decode_getfattr(&xdr, res->f_attr, res->server);
+ decode_getfattr(&xdr, res->f_attr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
status = decode_setattr(&xdr);
if (status)
goto out;
- decode_getfattr(&xdr, res->fattr, res->server);
+ decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
status = decode_write(&xdr, res);
if (status)
goto out;
- decode_getfattr(&xdr, res->fattr, res->server);
+ decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
if (!status)
status = res->count;
out:
status = decode_commit(&xdr, res);
if (status)
goto out;
- decode_getfattr(&xdr, res->fattr, res->server);
+ decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
if (status != 0)
goto out;
status = decode_delegreturn(&xdr);
- decode_getfattr(&xdr, res->fattr, res->server);
+ decode_getfattr(&xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
out:
return status;
}
goto out;
xdr_enter_page(&xdr, PAGE_SIZE);
status = decode_getfattr(&xdr, &res->fs_locations->fattr,
- res->fs_locations->server);
+ res->fs_locations->server,
+ !RPC_IS_ASYNC(req->rq_task));
out:
return status;
}
{ NFS4ERR_SERVERFAULT, -ESERVERFAULT },
{ NFS4ERR_BADTYPE, -EBADTYPE },
{ NFS4ERR_LOCKED, -EAGAIN },
- { NFS4ERR_RESOURCE, -EREMOTEIO },
{ NFS4ERR_SYMLINK, -ELOOP },
{ NFS4ERR_OP_ILLEGAL, -EOPNOTSUPP },
{ NFS4ERR_DEADLOCK, -EDEADLK },