diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-02-28 11:35:33 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-03-01 22:37:38 -0500 |
commit | 29a23909e41f6bfc892b362a75d7ed5fb74af1a2 (patch) | |
tree | 98bebd52df72e71d998ee54bf25399e55fa4df8f | |
parent | 4cbc8a571c24133a8b645c62188205908ef2ea83 (diff) |
NFS/flexfiles: Remove dead code in ff_layout_mirror_valid()
nfs4_ff_alloc_deviceid_node() guarantees that if mirror->mirror_ds is
a valid pointer, then so is mirror->mirror_ds->ds.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayoutdev.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index d8ef4042f25a..69fec9fe7f6c 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c | |||
@@ -183,15 +183,6 @@ out_err: | |||
183 | return NULL; | 183 | return NULL; |
184 | } | 184 | } |
185 | 185 | ||
186 | static void ff_layout_mark_devid_invalid(struct pnfs_layout_segment *lseg, | ||
187 | struct nfs4_deviceid_node *devid) | ||
188 | { | ||
189 | nfs4_mark_deviceid_unavailable(devid); | ||
190 | if (!ff_layout_has_available_ds(lseg)) | ||
191 | pnfs_error_mark_layout_for_return(lseg->pls_layout->plh_inode, | ||
192 | lseg); | ||
193 | } | ||
194 | |||
195 | static bool ff_layout_mirror_valid(struct pnfs_layout_segment *lseg, | 186 | static bool ff_layout_mirror_valid(struct pnfs_layout_segment *lseg, |
196 | struct nfs4_ff_layout_mirror *mirror, | 187 | struct nfs4_ff_layout_mirror *mirror, |
197 | bool create) | 188 | bool create) |
@@ -221,12 +212,6 @@ static bool ff_layout_mirror_valid(struct pnfs_layout_segment *lseg, | |||
221 | if (IS_ERR(mirror->mirror_ds)) | 212 | if (IS_ERR(mirror->mirror_ds)) |
222 | goto outerr; | 213 | goto outerr; |
223 | 214 | ||
224 | if (mirror->mirror_ds->ds == NULL) { | ||
225 | struct nfs4_deviceid_node *devid; | ||
226 | devid = &mirror->mirror_ds->id_node; | ||
227 | ff_layout_mark_devid_invalid(lseg, devid); | ||
228 | return false; | ||
229 | } | ||
230 | return true; | 215 | return true; |
231 | outerr: | 216 | outerr: |
232 | return false; | 217 | return false; |