diff options
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayout.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 74b36ed883ca..310d7500f665 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c | |||
@@ -1733,7 +1733,8 @@ ff_layout_read_pagelist(struct nfs_pgio_header *hdr) | |||
1733 | if (fh) | 1733 | if (fh) |
1734 | hdr->args.fh = fh; | 1734 | hdr->args.fh = fh; |
1735 | 1735 | ||
1736 | if (!nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid)) | 1736 | if (vers == 4 && |
1737 | !nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid)) | ||
1737 | goto out_failed; | 1738 | goto out_failed; |
1738 | 1739 | ||
1739 | /* | 1740 | /* |
@@ -1798,7 +1799,8 @@ ff_layout_write_pagelist(struct nfs_pgio_header *hdr, int sync) | |||
1798 | if (fh) | 1799 | if (fh) |
1799 | hdr->args.fh = fh; | 1800 | hdr->args.fh = fh; |
1800 | 1801 | ||
1801 | if (!nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid)) | 1802 | if (vers == 4 && |
1803 | !nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid)) | ||
1802 | goto out_failed; | 1804 | goto out_failed; |
1803 | 1805 | ||
1804 | /* | 1806 | /* |