Commit f97ff92b authored by Trond Myklebust's avatar Trond Myklebust

pNFS/flexfiles: Clean up redundant calls to pnfs_put_lseg()

Both nfs_pageio_reset_read_mds() and nfs_pageio_reset_write_mds()
do call pnfs_generic_pg_cleanup() for us.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent ac7cbb22
...@@ -844,8 +844,7 @@ ff_layout_pg_init_read(struct nfs_pageio_descriptor *pgio, ...@@ -844,8 +844,7 @@ ff_layout_pg_init_read(struct nfs_pageio_descriptor *pgio,
if (!ds) { if (!ds) {
if (!ff_layout_no_fallback_to_mds(pgio->pg_lseg)) if (!ff_layout_no_fallback_to_mds(pgio->pg_lseg))
goto out_mds; goto out_mds;
pnfs_put_lseg(pgio->pg_lseg); pnfs_generic_pg_cleanup(pgio);
pgio->pg_lseg = NULL;
/* Sleep for 1 second before retrying */ /* Sleep for 1 second before retrying */
ssleep(1); ssleep(1);
goto retry; goto retry;
...@@ -871,8 +870,6 @@ ff_layout_pg_init_read(struct nfs_pageio_descriptor *pgio, ...@@ -871,8 +870,6 @@ ff_layout_pg_init_read(struct nfs_pageio_descriptor *pgio,
0, NFS4_MAX_UINT64, IOMODE_READ, 0, NFS4_MAX_UINT64, IOMODE_READ,
NFS_I(pgio->pg_inode)->layout, NFS_I(pgio->pg_inode)->layout,
pgio->pg_lseg); pgio->pg_lseg);
pnfs_put_lseg(pgio->pg_lseg);
pgio->pg_lseg = NULL;
pgio->pg_maxretrans = 0; pgio->pg_maxretrans = 0;
nfs_pageio_reset_read_mds(pgio); nfs_pageio_reset_read_mds(pgio);
} }
...@@ -916,8 +913,7 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio, ...@@ -916,8 +913,7 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio,
if (!ds) { if (!ds) {
if (!ff_layout_no_fallback_to_mds(pgio->pg_lseg)) if (!ff_layout_no_fallback_to_mds(pgio->pg_lseg))
goto out_mds; goto out_mds;
pnfs_put_lseg(pgio->pg_lseg); pnfs_generic_pg_cleanup(pgio);
pgio->pg_lseg = NULL;
/* Sleep for 1 second before retrying */ /* Sleep for 1 second before retrying */
ssleep(1); ssleep(1);
goto retry; goto retry;
...@@ -939,8 +935,6 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio, ...@@ -939,8 +935,6 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio,
0, NFS4_MAX_UINT64, IOMODE_RW, 0, NFS4_MAX_UINT64, IOMODE_RW,
NFS_I(pgio->pg_inode)->layout, NFS_I(pgio->pg_inode)->layout,
pgio->pg_lseg); pgio->pg_lseg);
pnfs_put_lseg(pgio->pg_lseg);
pgio->pg_lseg = NULL;
pgio->pg_maxretrans = 0; pgio->pg_maxretrans = 0;
nfs_pageio_reset_write_mds(pgio); nfs_pageio_reset_write_mds(pgio);
pgio->pg_error = -EAGAIN; pgio->pg_error = -EAGAIN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment