aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c77
1 files changed, 43 insertions, 34 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 487a197231fd..c85dbee34b8a 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -545,6 +545,7 @@ struct compound_hdr {
545 __be32 * nops_p; 545 __be32 * nops_p;
546 uint32_t taglen; 546 uint32_t taglen;
547 char * tag; 547 char * tag;
548 uint32_t replen; /* expected reply words */
548}; 549};
549 550
550/* 551/*
@@ -580,9 +581,17 @@ static void encode_string(struct xdr_stream *xdr, unsigned int len, const char *
580 xdr_encode_opaque(p, str, len); 581 xdr_encode_opaque(p, str, len);
581} 582}
582 583
583static void encode_compound_hdr(struct xdr_stream *xdr, struct compound_hdr *hdr) 584static void encode_compound_hdr(struct xdr_stream *xdr,
585 struct rpc_rqst *req,
586 struct compound_hdr *hdr)
584{ 587{
585 __be32 *p; 588 __be32 *p;
589 struct rpc_auth *auth = req->rq_task->tk_msg.rpc_cred->cr_auth;
590
591 /* initialize running count of expected bytes in reply.
592 * NOTE: the replied tag SHOULD be the same is the one sent,
593 * but this is not required as a MUST for the server to do so. */
594 hdr->replen = RPC_REPHDRSIZE + auth->au_rslack + 3 + hdr->taglen;
586 595
587 dprintk("encode_compound: tag=%.*s\n", (int)hdr->taglen, hdr->tag); 596 dprintk("encode_compound: tag=%.*s\n", (int)hdr->taglen, hdr->tag);
588 BUG_ON(hdr->taglen > NFS4_MAXTAGLEN); 597 BUG_ON(hdr->taglen > NFS4_MAXTAGLEN);
@@ -1359,7 +1368,7 @@ static int nfs4_xdr_enc_access(struct rpc_rqst *req, __be32 *p, const struct nfs
1359 }; 1368 };
1360 1369
1361 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1370 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1362 encode_compound_hdr(&xdr, &hdr); 1371 encode_compound_hdr(&xdr, req, &hdr);
1363 encode_putfh(&xdr, args->fh, &hdr); 1372 encode_putfh(&xdr, args->fh, &hdr);
1364 encode_access(&xdr, args->access, &hdr); 1373 encode_access(&xdr, args->access, &hdr);
1365 encode_getfattr(&xdr, args->bitmask, &hdr); 1374 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1378,7 +1387,7 @@ static int nfs4_xdr_enc_lookup(struct rpc_rqst *req, __be32 *p, const struct nfs
1378 }; 1387 };
1379 1388
1380 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1389 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1381 encode_compound_hdr(&xdr, &hdr); 1390 encode_compound_hdr(&xdr, req, &hdr);
1382 encode_putfh(&xdr, args->dir_fh, &hdr); 1391 encode_putfh(&xdr, args->dir_fh, &hdr);
1383 encode_lookup(&xdr, args->name, &hdr); 1392 encode_lookup(&xdr, args->name, &hdr);
1384 encode_getfh(&xdr, &hdr); 1393 encode_getfh(&xdr, &hdr);
@@ -1398,7 +1407,7 @@ static int nfs4_xdr_enc_lookup_root(struct rpc_rqst *req, __be32 *p, const struc
1398 }; 1407 };
1399 1408
1400 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1409 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1401 encode_compound_hdr(&xdr, &hdr); 1410 encode_compound_hdr(&xdr, req, &hdr);
1402 encode_putrootfh(&xdr, &hdr); 1411 encode_putrootfh(&xdr, &hdr);
1403 encode_getfh(&xdr, &hdr); 1412 encode_getfh(&xdr, &hdr);
1404 encode_getfattr(&xdr, args->bitmask, &hdr); 1413 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1417,7 +1426,7 @@ static int nfs4_xdr_enc_remove(struct rpc_rqst *req, __be32 *p, const struct nfs
1417 }; 1426 };
1418 1427
1419 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1428 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1420 encode_compound_hdr(&xdr, &hdr); 1429 encode_compound_hdr(&xdr, req, &hdr);
1421 encode_putfh(&xdr, args->fh, &hdr); 1430 encode_putfh(&xdr, args->fh, &hdr);
1422 encode_remove(&xdr, &args->name, &hdr); 1431 encode_remove(&xdr, &args->name, &hdr);
1423 encode_getfattr(&xdr, args->bitmask, &hdr); 1432 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1436,7 +1445,7 @@ static int nfs4_xdr_enc_rename(struct rpc_rqst *req, __be32 *p, const struct nfs
1436 }; 1445 };
1437 1446
1438 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1447 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1439 encode_compound_hdr(&xdr, &hdr); 1448 encode_compound_hdr(&xdr, req, &hdr);
1440 encode_putfh(&xdr, args->old_dir, &hdr); 1449 encode_putfh(&xdr, args->old_dir, &hdr);
1441 encode_savefh(&xdr, &hdr); 1450 encode_savefh(&xdr, &hdr);
1442 encode_putfh(&xdr, args->new_dir, &hdr); 1451 encode_putfh(&xdr, args->new_dir, &hdr);
@@ -1459,7 +1468,7 @@ static int nfs4_xdr_enc_link(struct rpc_rqst *req, __be32 *p, const struct nfs4_
1459 }; 1468 };
1460 1469
1461 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1470 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1462 encode_compound_hdr(&xdr, &hdr); 1471 encode_compound_hdr(&xdr, req, &hdr);
1463 encode_putfh(&xdr, args->fh, &hdr); 1472 encode_putfh(&xdr, args->fh, &hdr);
1464 encode_savefh(&xdr, &hdr); 1473 encode_savefh(&xdr, &hdr);
1465 encode_putfh(&xdr, args->dir_fh, &hdr); 1474 encode_putfh(&xdr, args->dir_fh, &hdr);
@@ -1482,7 +1491,7 @@ static int nfs4_xdr_enc_create(struct rpc_rqst *req, __be32 *p, const struct nfs
1482 }; 1491 };
1483 1492
1484 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1493 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1485 encode_compound_hdr(&xdr, &hdr); 1494 encode_compound_hdr(&xdr, req, &hdr);
1486 encode_putfh(&xdr, args->dir_fh, &hdr); 1495 encode_putfh(&xdr, args->dir_fh, &hdr);
1487 encode_savefh(&xdr, &hdr); 1496 encode_savefh(&xdr, &hdr);
1488 encode_create(&xdr, args, &hdr); 1497 encode_create(&xdr, args, &hdr);
@@ -1513,7 +1522,7 @@ static int nfs4_xdr_enc_getattr(struct rpc_rqst *req, __be32 *p, const struct nf
1513 }; 1522 };
1514 1523
1515 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1524 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1516 encode_compound_hdr(&xdr, &hdr); 1525 encode_compound_hdr(&xdr, req, &hdr);
1517 encode_putfh(&xdr, args->fh, &hdr); 1526 encode_putfh(&xdr, args->fh, &hdr);
1518 encode_getfattr(&xdr, args->bitmask, &hdr); 1527 encode_getfattr(&xdr, args->bitmask, &hdr);
1519 encode_nops(&hdr); 1528 encode_nops(&hdr);
@@ -1531,7 +1540,7 @@ static int nfs4_xdr_enc_close(struct rpc_rqst *req, __be32 *p, struct nfs_closea
1531 }; 1540 };
1532 1541
1533 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1542 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1534 encode_compound_hdr(&xdr, &hdr); 1543 encode_compound_hdr(&xdr, req, &hdr);
1535 encode_putfh(&xdr, args->fh, &hdr); 1544 encode_putfh(&xdr, args->fh, &hdr);
1536 encode_close(&xdr, args, &hdr); 1545 encode_close(&xdr, args, &hdr);
1537 encode_getfattr(&xdr, args->bitmask, &hdr); 1546 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1550,7 +1559,7 @@ static int nfs4_xdr_enc_open(struct rpc_rqst *req, __be32 *p, struct nfs_openarg
1550 }; 1559 };
1551 1560
1552 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1561 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1553 encode_compound_hdr(&xdr, &hdr); 1562 encode_compound_hdr(&xdr, req, &hdr);
1554 encode_putfh(&xdr, args->fh, &hdr); 1563 encode_putfh(&xdr, args->fh, &hdr);
1555 encode_savefh(&xdr, &hdr); 1564 encode_savefh(&xdr, &hdr);
1556 encode_open(&xdr, args, &hdr); 1565 encode_open(&xdr, args, &hdr);
@@ -1573,7 +1582,7 @@ static int nfs4_xdr_enc_open_confirm(struct rpc_rqst *req, __be32 *p, struct nfs
1573 }; 1582 };
1574 1583
1575 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1584 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1576 encode_compound_hdr(&xdr, &hdr); 1585 encode_compound_hdr(&xdr, req, &hdr);
1577 encode_putfh(&xdr, args->fh, &hdr); 1586 encode_putfh(&xdr, args->fh, &hdr);
1578 encode_open_confirm(&xdr, args, &hdr); 1587 encode_open_confirm(&xdr, args, &hdr);
1579 encode_nops(&hdr); 1588 encode_nops(&hdr);
@@ -1591,7 +1600,7 @@ static int nfs4_xdr_enc_open_noattr(struct rpc_rqst *req, __be32 *p, struct nfs_
1591 }; 1600 };
1592 1601
1593 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1602 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1594 encode_compound_hdr(&xdr, &hdr); 1603 encode_compound_hdr(&xdr, req, &hdr);
1595 encode_putfh(&xdr, args->fh, &hdr); 1604 encode_putfh(&xdr, args->fh, &hdr);
1596 encode_open(&xdr, args, &hdr); 1605 encode_open(&xdr, args, &hdr);
1597 encode_getfattr(&xdr, args->bitmask, &hdr); 1606 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1610,7 +1619,7 @@ static int nfs4_xdr_enc_open_downgrade(struct rpc_rqst *req, __be32 *p, struct n
1610 }; 1619 };
1611 1620
1612 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1621 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1613 encode_compound_hdr(&xdr, &hdr); 1622 encode_compound_hdr(&xdr, req, &hdr);
1614 encode_putfh(&xdr, args->fh, &hdr); 1623 encode_putfh(&xdr, args->fh, &hdr);
1615 encode_open_downgrade(&xdr, args, &hdr); 1624 encode_open_downgrade(&xdr, args, &hdr);
1616 encode_getfattr(&xdr, args->bitmask, &hdr); 1625 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1629,7 +1638,7 @@ static int nfs4_xdr_enc_lock(struct rpc_rqst *req, __be32 *p, struct nfs_lock_ar
1629 }; 1638 };
1630 1639
1631 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1640 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1632 encode_compound_hdr(&xdr, &hdr); 1641 encode_compound_hdr(&xdr, req, &hdr);
1633 encode_putfh(&xdr, args->fh, &hdr); 1642 encode_putfh(&xdr, args->fh, &hdr);
1634 encode_lock(&xdr, args, &hdr); 1643 encode_lock(&xdr, args, &hdr);
1635 encode_nops(&hdr); 1644 encode_nops(&hdr);
@@ -1647,7 +1656,7 @@ static int nfs4_xdr_enc_lockt(struct rpc_rqst *req, __be32 *p, struct nfs_lockt_
1647 }; 1656 };
1648 1657
1649 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1658 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1650 encode_compound_hdr(&xdr, &hdr); 1659 encode_compound_hdr(&xdr, req, &hdr);
1651 encode_putfh(&xdr, args->fh, &hdr); 1660 encode_putfh(&xdr, args->fh, &hdr);
1652 encode_lockt(&xdr, args, &hdr); 1661 encode_lockt(&xdr, args, &hdr);
1653 encode_nops(&hdr); 1662 encode_nops(&hdr);
@@ -1665,7 +1674,7 @@ static int nfs4_xdr_enc_locku(struct rpc_rqst *req, __be32 *p, struct nfs_locku_
1665 }; 1674 };
1666 1675
1667 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1676 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1668 encode_compound_hdr(&xdr, &hdr); 1677 encode_compound_hdr(&xdr, req, &hdr);
1669 encode_putfh(&xdr, args->fh, &hdr); 1678 encode_putfh(&xdr, args->fh, &hdr);
1670 encode_locku(&xdr, args, &hdr); 1679 encode_locku(&xdr, args, &hdr);
1671 encode_nops(&hdr); 1680 encode_nops(&hdr);
@@ -1685,7 +1694,7 @@ static int nfs4_xdr_enc_readlink(struct rpc_rqst *req, __be32 *p, const struct n
1685 unsigned int replen; 1694 unsigned int replen;
1686 1695
1687 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1696 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1688 encode_compound_hdr(&xdr, &hdr); 1697 encode_compound_hdr(&xdr, req, &hdr);
1689 encode_putfh(&xdr, args->fh, &hdr); 1698 encode_putfh(&xdr, args->fh, &hdr);
1690 encode_readlink(&xdr, args, req, &hdr); 1699 encode_readlink(&xdr, args, req, &hdr);
1691 1700
@@ -1713,7 +1722,7 @@ static int nfs4_xdr_enc_readdir(struct rpc_rqst *req, __be32 *p, const struct nf
1713 int replen; 1722 int replen;
1714 1723
1715 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1724 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1716 encode_compound_hdr(&xdr, &hdr); 1725 encode_compound_hdr(&xdr, req, &hdr);
1717 encode_putfh(&xdr, args->fh, &hdr); 1726 encode_putfh(&xdr, args->fh, &hdr);
1718 encode_readdir(&xdr, args, req, &hdr); 1727 encode_readdir(&xdr, args, req, &hdr);
1719 1728
@@ -1744,7 +1753,7 @@ static int nfs4_xdr_enc_read(struct rpc_rqst *req, __be32 *p, struct nfs_readarg
1744 int replen; 1753 int replen;
1745 1754
1746 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1755 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1747 encode_compound_hdr(&xdr, &hdr); 1756 encode_compound_hdr(&xdr, req, &hdr);
1748 encode_putfh(&xdr, args->fh, &hdr); 1757 encode_putfh(&xdr, args->fh, &hdr);
1749 encode_read(&xdr, args, &hdr); 1758 encode_read(&xdr, args, &hdr);
1750 1759
@@ -1771,7 +1780,7 @@ static int nfs4_xdr_enc_setattr(struct rpc_rqst *req, __be32 *p, struct nfs_seta
1771 }; 1780 };
1772 1781
1773 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1782 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1774 encode_compound_hdr(&xdr, &hdr); 1783 encode_compound_hdr(&xdr, req, &hdr);
1775 encode_putfh(&xdr, args->fh, &hdr); 1784 encode_putfh(&xdr, args->fh, &hdr);
1776 encode_setattr(&xdr, args, args->server, &hdr); 1785 encode_setattr(&xdr, args, args->server, &hdr);
1777 encode_getfattr(&xdr, args->bitmask, &hdr); 1786 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1794,7 +1803,7 @@ nfs4_xdr_enc_getacl(struct rpc_rqst *req, __be32 *p,
1794 int replen; 1803 int replen;
1795 1804
1796 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1805 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1797 encode_compound_hdr(&xdr, &hdr); 1806 encode_compound_hdr(&xdr, req, &hdr);
1798 encode_putfh(&xdr, args->fh, &hdr); 1807 encode_putfh(&xdr, args->fh, &hdr);
1799 encode_getattr_two(&xdr, FATTR4_WORD0_ACL, 0, &hdr); 1808 encode_getattr_two(&xdr, FATTR4_WORD0_ACL, 0, &hdr);
1800 1809
@@ -1817,7 +1826,7 @@ static int nfs4_xdr_enc_write(struct rpc_rqst *req, __be32 *p, struct nfs_writea
1817 }; 1826 };
1818 1827
1819 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1828 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1820 encode_compound_hdr(&xdr, &hdr); 1829 encode_compound_hdr(&xdr, req, &hdr);
1821 encode_putfh(&xdr, args->fh, &hdr); 1830 encode_putfh(&xdr, args->fh, &hdr);
1822 encode_write(&xdr, args, &hdr); 1831 encode_write(&xdr, args, &hdr);
1823 req->rq_snd_buf.flags |= XDRBUF_WRITE; 1832 req->rq_snd_buf.flags |= XDRBUF_WRITE;
@@ -1837,7 +1846,7 @@ static int nfs4_xdr_enc_commit(struct rpc_rqst *req, __be32 *p, struct nfs_write
1837 }; 1846 };
1838 1847
1839 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1848 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1840 encode_compound_hdr(&xdr, &hdr); 1849 encode_compound_hdr(&xdr, req, &hdr);
1841 encode_putfh(&xdr, args->fh, &hdr); 1850 encode_putfh(&xdr, args->fh, &hdr);
1842 encode_commit(&xdr, args, &hdr); 1851 encode_commit(&xdr, args, &hdr);
1843 encode_getfattr(&xdr, args->bitmask, &hdr); 1852 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1856,7 +1865,7 @@ static int nfs4_xdr_enc_fsinfo(struct rpc_rqst *req, __be32 *p, struct nfs4_fsin
1856 }; 1865 };
1857 1866
1858 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1867 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1859 encode_compound_hdr(&xdr, &hdr); 1868 encode_compound_hdr(&xdr, req, &hdr);
1860 encode_putfh(&xdr, args->fh, &hdr); 1869 encode_putfh(&xdr, args->fh, &hdr);
1861 encode_fsinfo(&xdr, args->bitmask, &hdr); 1870 encode_fsinfo(&xdr, args->bitmask, &hdr);
1862 encode_nops(&hdr); 1871 encode_nops(&hdr);
@@ -1874,7 +1883,7 @@ static int nfs4_xdr_enc_pathconf(struct rpc_rqst *req, __be32 *p, const struct n
1874 }; 1883 };
1875 1884
1876 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1885 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1877 encode_compound_hdr(&xdr, &hdr); 1886 encode_compound_hdr(&xdr, req, &hdr);
1878 encode_putfh(&xdr, args->fh, &hdr); 1887 encode_putfh(&xdr, args->fh, &hdr);
1879 encode_getattr_one(&xdr, args->bitmask[0] & nfs4_pathconf_bitmap[0], 1888 encode_getattr_one(&xdr, args->bitmask[0] & nfs4_pathconf_bitmap[0],
1880 &hdr); 1889 &hdr);
@@ -1893,7 +1902,7 @@ static int nfs4_xdr_enc_statfs(struct rpc_rqst *req, __be32 *p, const struct nfs
1893 }; 1902 };
1894 1903
1895 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1904 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1896 encode_compound_hdr(&xdr, &hdr); 1905 encode_compound_hdr(&xdr, req, &hdr);
1897 encode_putfh(&xdr, args->fh, &hdr); 1906 encode_putfh(&xdr, args->fh, &hdr);
1898 encode_getattr_two(&xdr, args->bitmask[0] & nfs4_statfs_bitmap[0], 1907 encode_getattr_two(&xdr, args->bitmask[0] & nfs4_statfs_bitmap[0],
1899 args->bitmask[1] & nfs4_statfs_bitmap[1], &hdr); 1908 args->bitmask[1] & nfs4_statfs_bitmap[1], &hdr);
@@ -1913,7 +1922,7 @@ static int nfs4_xdr_enc_server_caps(struct rpc_rqst *req, __be32 *p,
1913 }; 1922 };
1914 1923
1915 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1924 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1916 encode_compound_hdr(&xdr, &hdr); 1925 encode_compound_hdr(&xdr, req, &hdr);
1917 encode_putfh(&xdr, args->fhandle, &hdr); 1926 encode_putfh(&xdr, args->fhandle, &hdr);
1918 encode_getattr_one(&xdr, FATTR4_WORD0_SUPPORTED_ATTRS| 1927 encode_getattr_one(&xdr, FATTR4_WORD0_SUPPORTED_ATTRS|
1919 FATTR4_WORD0_LINK_SUPPORT| 1928 FATTR4_WORD0_LINK_SUPPORT|
@@ -1934,7 +1943,7 @@ static int nfs4_xdr_enc_renew(struct rpc_rqst *req, __be32 *p, struct nfs_client
1934 }; 1943 };
1935 1944
1936 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1945 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1937 encode_compound_hdr(&xdr, &hdr); 1946 encode_compound_hdr(&xdr, req, &hdr);
1938 encode_renew(&xdr, clp, &hdr); 1947 encode_renew(&xdr, clp, &hdr);
1939 encode_nops(&hdr); 1948 encode_nops(&hdr);
1940 return 0; 1949 return 0;
@@ -1951,7 +1960,7 @@ static int nfs4_xdr_enc_setclientid(struct rpc_rqst *req, __be32 *p, struct nfs4
1951 }; 1960 };
1952 1961
1953 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1962 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1954 encode_compound_hdr(&xdr, &hdr); 1963 encode_compound_hdr(&xdr, req, &hdr);
1955 encode_setclientid(&xdr, sc, &hdr); 1964 encode_setclientid(&xdr, sc, &hdr);
1956 encode_nops(&hdr); 1965 encode_nops(&hdr);
1957 return 0; 1966 return 0;
@@ -1969,7 +1978,7 @@ static int nfs4_xdr_enc_setclientid_confirm(struct rpc_rqst *req, __be32 *p, str
1969 const u32 lease_bitmap[2] = { FATTR4_WORD0_LEASE_TIME, 0 }; 1978 const u32 lease_bitmap[2] = { FATTR4_WORD0_LEASE_TIME, 0 };
1970 1979
1971 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1980 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1972 encode_compound_hdr(&xdr, &hdr); 1981 encode_compound_hdr(&xdr, req, &hdr);
1973 encode_setclientid_confirm(&xdr, clp, &hdr); 1982 encode_setclientid_confirm(&xdr, clp, &hdr);
1974 encode_putrootfh(&xdr, &hdr); 1983 encode_putrootfh(&xdr, &hdr);
1975 encode_fsinfo(&xdr, lease_bitmap, &hdr); 1984 encode_fsinfo(&xdr, lease_bitmap, &hdr);
@@ -1988,7 +1997,7 @@ static int nfs4_xdr_enc_delegreturn(struct rpc_rqst *req, __be32 *p, const struc
1988 }; 1997 };
1989 1998
1990 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1999 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1991 encode_compound_hdr(&xdr, &hdr); 2000 encode_compound_hdr(&xdr, req, &hdr);
1992 encode_putfh(&xdr, args->fhandle, &hdr); 2001 encode_putfh(&xdr, args->fhandle, &hdr);
1993 encode_delegreturn(&xdr, args->stateid, &hdr); 2002 encode_delegreturn(&xdr, args->stateid, &hdr);
1994 encode_getfattr(&xdr, args->bitmask, &hdr); 2003 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -2009,7 +2018,7 @@ static int nfs4_xdr_enc_fs_locations(struct rpc_rqst *req, __be32 *p, struct nfs
2009 int replen; 2018 int replen;
2010 2019
2011 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 2020 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
2012 encode_compound_hdr(&xdr, &hdr); 2021 encode_compound_hdr(&xdr, req, &hdr);
2013 encode_putfh(&xdr, args->dir_fh, &hdr); 2022 encode_putfh(&xdr, args->dir_fh, &hdr);
2014 encode_lookup(&xdr, args->name, &hdr); 2023 encode_lookup(&xdr, args->name, &hdr);
2015 encode_fs_locations(&xdr, args->bitmask, &hdr); 2024 encode_fs_locations(&xdr, args->bitmask, &hdr);
@@ -3989,7 +3998,7 @@ nfs4_xdr_enc_setacl(struct rpc_rqst *req, __be32 *p, struct nfs_setaclargs *args
3989 int status; 3998 int status;
3990 3999
3991 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 4000 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
3992 encode_compound_hdr(&xdr, &hdr); 4001 encode_compound_hdr(&xdr, req, &hdr);
3993 encode_putfh(&xdr, args->fh, &hdr); 4002 encode_putfh(&xdr, args->fh, &hdr);
3994 status = encode_setacl(&xdr, args, &hdr); 4003 status = encode_setacl(&xdr, args, &hdr);
3995 encode_nops(&hdr); 4004 encode_nops(&hdr);