summaryrefslogtreecommitdiffstats
path: root/kernel/fs/nfs/filelayout
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/nfs/filelayout')
-rw-r--r--kernel/fs/nfs/filelayout/filelayout.c3
-rw-r--r--kernel/fs/nfs/filelayout/filelayoutdev.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/kernel/fs/nfs/filelayout/filelayout.c b/kernel/fs/nfs/filelayout/filelayout.c
index 02ec07973..fd8da630f 100644
--- a/kernel/fs/nfs/filelayout/filelayout.c
+++ b/kernel/fs/nfs/filelayout/filelayout.c
@@ -374,8 +374,7 @@ static int filelayout_commit_done_cb(struct rpc_task *task,
return -EAGAIN;
}
- if (data->verf.committed == NFS_UNSTABLE)
- pnfs_set_layoutcommit(data->inode, data->lseg, data->lwb);
+ pnfs_set_layoutcommit(data->inode, data->lseg, data->lwb);
return 0;
}
diff --git a/kernel/fs/nfs/filelayout/filelayoutdev.c b/kernel/fs/nfs/filelayout/filelayoutdev.c
index 4946ef40b..85ef38f97 100644
--- a/kernel/fs/nfs/filelayout/filelayoutdev.c
+++ b/kernel/fs/nfs/filelayout/filelayoutdev.c
@@ -283,7 +283,8 @@ nfs4_fl_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx)
s->nfs_client->cl_rpcclient->cl_auth->au_flavor);
out_test_devid:
- if (filelayout_test_devid_unavailable(devid))
+ if (ret->ds_clp == NULL ||
+ filelayout_test_devid_unavailable(devid))
ret = NULL;
out:
return ret;