ANDROID: mnt: Fix next_descendent
authorDaniel Rosenberg <drosen@google.com>
Mon, 29 May 2017 23:38:16 +0000 (16:38 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 21 Jun 2017 11:04:04 +0000 (16:34 +0530)
commit8dc6dd62d442f9a22442cc53161adeaa2d431e31
treeb82e4c06eafc42703645b2ba4701878662b2e1f9
parentbe74fd2af86d551009c7a47d4884f29349d59193
ANDROID: mnt: Fix next_descendent

next_descendent did not properly handle the case
where the initial mount had no slaves. In this case,
we would look for the next slave, but since don't
have a master, the check for wrapping around to the
start of the list will always fail. Instead, we check
for this case, and ensure that we end the iteration
when we come back to the root.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 62094374
Change-Id: I43dfcee041aa3730cb4b9a1161418974ef84812e
fs/pnode.c