diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-12-06 14:23:35 +0000 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-12-06 14:23:35 +0000 |
commit | 3642a0a2c7d2d1949988d0fd004a8039c1f3d02f (patch) | |
tree | e687c88b1b66ad51a6a6c529f7f328f2d3b625fa /fs/nfs/pnfs.c | |
parent | 58a273745fbb2fbd01d26e7a60f0acc8c1d99469 (diff) | |
parent | b07fed455c883f07f8e847f5b0d79975b4dc8e7a (diff) | |
download | linux-3642a0a2c7d2d1949988d0fd004a8039c1f3d02f.tar.gz linux-3642a0a2c7d2d1949988d0fd004a8039c1f3d02f.tar.bz2 linux-3642a0a2c7d2d1949988d0fd004a8039c1f3d02f.zip |
Merge branch 'mxs/saif' into next/drivers
Conflicts:
drivers/net/ethernet/cadence/Kconfig
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index baf73536bc04..8e672a2b2d69 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1260,6 +1260,25 @@ pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc) } EXPORT_SYMBOL_GPL(pnfs_generic_pg_writepages); +static void pnfs_ld_handle_read_error(struct nfs_read_data *data) +{ + struct nfs_pageio_descriptor pgio; + + put_lseg(data->lseg); + data->lseg = NULL; + dprintk("pnfs write error = %d\n", data->pnfs_error); + + nfs_pageio_init_read_mds(&pgio, data->inode); + + while (!list_empty(&data->pages)) { + struct nfs_page *req = nfs_list_entry(data->pages.next); + + nfs_list_remove_request(req); + nfs_pageio_add_request(&pgio, req); + } + nfs_pageio_complete(&pgio); +} + /* * Called by non rpc-based layout drivers */ @@ -1268,11 +1287,8 @@ void pnfs_ld_read_done(struct nfs_read_data *data) if (likely(!data->pnfs_error)) { __nfs4_read_done_cb(data); data->mds_ops->rpc_call_done(&data->task, data); - } else { - put_lseg(data->lseg); - data->lseg = NULL; - dprintk("pnfs write error = %d\n", data->pnfs_error); - } + } else + pnfs_ld_handle_read_error(data); data->mds_ops->rpc_release(data); } EXPORT_SYMBOL_GPL(pnfs_ld_read_done); |