Skip to content

Commit

Permalink
NFSv4.1/pNFS: Cleanup pnfs_mark_matching_lsegs_invalid()
Browse files Browse the repository at this point in the history
Make it more obvious what we're returning...

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Trond Myklebust committed Jan 4, 2016
1 parent 4b0934b commit 71b3985
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
struct pnfs_layout_range *recall_range)
{
struct pnfs_layout_segment *lseg, *next;
int invalid = 0, removed = 0;
int remaining = 0;

dprintk("%s:Begin lo %p\n", __func__, lo);

Expand All @@ -582,11 +582,11 @@ pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
"offset %llu length %llu\n", __func__,
lseg, lseg->pls_range.iomode, lseg->pls_range.offset,
lseg->pls_range.length);
invalid++;
removed += mark_lseg_invalid(lseg, tmp_list);
if (!mark_lseg_invalid(lseg, tmp_list))
remaining++;
}
dprintk("%s:Return %i\n", __func__, invalid - removed);
return invalid - removed;
dprintk("%s:Return %i\n", __func__, remaining);
return remaining;
}

/* note free_me must contain lsegs from a single layout_hdr */
Expand Down

0 comments on commit 71b3985

Please sign in to comment.