Commit 71b39854 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4.1/pNFS: Cleanup pnfs_mark_matching_lsegs_invalid()

Make it more obvious what we're returning...
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 4b0934ba
...@@ -569,7 +569,7 @@ pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo, ...@@ -569,7 +569,7 @@ pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
struct pnfs_layout_range *recall_range) struct pnfs_layout_range *recall_range)
{ {
struct pnfs_layout_segment *lseg, *next; struct pnfs_layout_segment *lseg, *next;
int invalid = 0, removed = 0; int remaining = 0;
dprintk("%s:Begin lo %p\n", __func__, lo); dprintk("%s:Begin lo %p\n", __func__, lo);
...@@ -582,11 +582,11 @@ pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo, ...@@ -582,11 +582,11 @@ pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
"offset %llu length %llu\n", __func__, "offset %llu length %llu\n", __func__,
lseg, lseg->pls_range.iomode, lseg->pls_range.offset, lseg, lseg->pls_range.iomode, lseg->pls_range.offset,
lseg->pls_range.length); lseg->pls_range.length);
invalid++; if (!mark_lseg_invalid(lseg, tmp_list))
removed += mark_lseg_invalid(lseg, tmp_list); remaining++;
} }
dprintk("%s:Return %i\n", __func__, invalid - removed); dprintk("%s:Return %i\n", __func__, remaining);
return invalid - removed; return remaining;
} }
/* note free_me must contain lsegs from a single layout_hdr */ /* note free_me must contain lsegs from a single layout_hdr */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment