LU-3182 lmv: fix duplicate directory entries
In
4e57f6dd3a156e35ccb587fc5c003805dd73ecb7, I accidentally
introduced a new way for duplicate directory entries to be returned
from readdir(). That patch fails to properly decrement the nlupgs
counter when breaking out of the inner-for loop. This accounting
error causes an extra iteration of the inner-for loop when processing
the next cfs page and a bad ldp_hash_end value is then saved in the
lu_dirpage. To fix this, always decrement the nlupgs counter on
entry into the inner loop.
Note: this bug only affects architectures with > 4k-sized pages, e.g.
PowerPC.
Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I9fa0fd8f34081f834f1d8b4df633d6e08926dcc9
Reviewed-on: http://review.whamcloud.com/6405
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>