aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/filelayout/filelayout.c1
-rw-r--r--fs/nfs/pnfs.c3
2 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index ae07b0f56659..bb1f4e7a3270 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -202,6 +202,7 @@ static int filelayout_async_handle_error(struct rpc_task *task,
202 task->tk_status); 202 task->tk_status);
203 nfs4_mark_deviceid_unavailable(devid); 203 nfs4_mark_deviceid_unavailable(devid);
204 pnfs_error_mark_layout_for_return(inode, lseg); 204 pnfs_error_mark_layout_for_return(inode, lseg);
205 pnfs_set_lo_fail(lseg);
205 rpc_wake_up(&tbl->slot_tbl_waitq); 206 rpc_wake_up(&tbl->slot_tbl_waitq);
206 /* fall through */ 207 /* fall through */
207 default: 208 default:
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 6b42362cdbb0..113c3b327e24 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1763,7 +1763,6 @@ void pnfs_error_mark_layout_for_return(struct inode *inode,
1763 struct pnfs_layout_segment *lseg) 1763 struct pnfs_layout_segment *lseg)
1764{ 1764{
1765 struct pnfs_layout_hdr *lo = NFS_I(inode)->layout; 1765 struct pnfs_layout_hdr *lo = NFS_I(inode)->layout;
1766 int iomode = pnfs_iomode_to_fail_bit(lseg->pls_range.iomode);
1767 struct pnfs_layout_range range = { 1766 struct pnfs_layout_range range = {
1768 .iomode = lseg->pls_range.iomode, 1767 .iomode = lseg->pls_range.iomode,
1769 .offset = 0, 1768 .offset = 0,
@@ -1772,8 +1771,6 @@ void pnfs_error_mark_layout_for_return(struct inode *inode,
1772 LIST_HEAD(free_me); 1771 LIST_HEAD(free_me);
1773 1772
1774 spin_lock(&inode->i_lock); 1773 spin_lock(&inode->i_lock);
1775 /* set failure bit so that pnfs path will be retried later */
1776 pnfs_layout_set_fail_bit(lo, iomode);
1777 if (lo->plh_return_iomode == 0) 1774 if (lo->plh_return_iomode == 0)
1778 lo->plh_return_iomode = range.iomode; 1775 lo->plh_return_iomode = range.iomode;
1779 else if (lo->plh_return_iomode != range.iomode) 1776 else if (lo->plh_return_iomode != range.iomode)