summaryrefslogtreecommitdiffstats
path: root/kernel/fs/nfs/filelayout/filelayoutdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/nfs/filelayout/filelayoutdev.c')
-rw-r--r--kernel/fs/nfs/filelayout/filelayoutdev.c3
1 files changed, 2 insertions, 1 deletions
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;