diff options
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayout.c')
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayout.c | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 0ca4af8cca5d..cc9064974104 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c | |||
@@ -1384,30 +1384,14 @@ static void ff_layout_read_prepare_v3(struct rpc_task *task, void *data) | |||
1384 | rpc_call_start(task); | 1384 | rpc_call_start(task); |
1385 | } | 1385 | } |
1386 | 1386 | ||
1387 | static int ff_layout_setup_sequence(struct nfs_client *ds_clp, | ||
1388 | struct nfs4_sequence_args *args, | ||
1389 | struct nfs4_sequence_res *res, | ||
1390 | struct rpc_task *task) | ||
1391 | { | ||
1392 | if (ds_clp->cl_session) | ||
1393 | return nfs41_setup_sequence(ds_clp->cl_session, | ||
1394 | args, | ||
1395 | res, | ||
1396 | task); | ||
1397 | return nfs40_setup_sequence(ds_clp->cl_slot_tbl, | ||
1398 | args, | ||
1399 | res, | ||
1400 | task); | ||
1401 | } | ||
1402 | |||
1403 | static void ff_layout_read_prepare_v4(struct rpc_task *task, void *data) | 1387 | static void ff_layout_read_prepare_v4(struct rpc_task *task, void *data) |
1404 | { | 1388 | { |
1405 | struct nfs_pgio_header *hdr = data; | 1389 | struct nfs_pgio_header *hdr = data; |
1406 | 1390 | ||
1407 | if (ff_layout_setup_sequence(hdr->ds_clp, | 1391 | if (nfs4_setup_sequence(hdr->ds_clp, |
1408 | &hdr->args.seq_args, | 1392 | &hdr->args.seq_args, |
1409 | &hdr->res.seq_res, | 1393 | &hdr->res.seq_res, |
1410 | task)) | 1394 | task)) |
1411 | return; | 1395 | return; |
1412 | 1396 | ||
1413 | if (ff_layout_read_prepare_common(task, hdr)) | 1397 | if (ff_layout_read_prepare_common(task, hdr)) |
@@ -1578,10 +1562,10 @@ static void ff_layout_write_prepare_v4(struct rpc_task *task, void *data) | |||
1578 | { | 1562 | { |
1579 | struct nfs_pgio_header *hdr = data; | 1563 | struct nfs_pgio_header *hdr = data; |
1580 | 1564 | ||
1581 | if (ff_layout_setup_sequence(hdr->ds_clp, | 1565 | if (nfs4_setup_sequence(hdr->ds_clp, |
1582 | &hdr->args.seq_args, | 1566 | &hdr->args.seq_args, |
1583 | &hdr->res.seq_res, | 1567 | &hdr->res.seq_res, |
1584 | task)) | 1568 | task)) |
1585 | return; | 1569 | return; |
1586 | 1570 | ||
1587 | if (ff_layout_write_prepare_common(task, hdr)) | 1571 | if (ff_layout_write_prepare_common(task, hdr)) |
@@ -1667,10 +1651,10 @@ static void ff_layout_commit_prepare_v4(struct rpc_task *task, void *data) | |||
1667 | { | 1651 | { |
1668 | struct nfs_commit_data *wdata = data; | 1652 | struct nfs_commit_data *wdata = data; |
1669 | 1653 | ||
1670 | if (ff_layout_setup_sequence(wdata->ds_clp, | 1654 | if (nfs4_setup_sequence(wdata->ds_clp, |
1671 | &wdata->args.seq_args, | 1655 | &wdata->args.seq_args, |
1672 | &wdata->res.seq_res, | 1656 | &wdata->res.seq_res, |
1673 | task)) | 1657 | task)) |
1674 | return; | 1658 | return; |
1675 | ff_layout_commit_prepare_common(task, data); | 1659 | ff_layout_commit_prepare_common(task, data); |
1676 | } | 1660 | } |