staging/lustre/lmv: fix duplicate directory entries
staging/lustre/lmv: fix duplicate directory entries

Previously, 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.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3182
Lustre-change: http://review.whamcloud.com/6405
Signed-off-by: Ned Bass <b8c8dd8f747f1a510525ee56a3584fdc28e4c351@llnl.gov>
Reviewed-by: Fan Yong <ab453e5c5a64c8df72d3573911da2af406d0c762@intel.com>
Reviewed-by: Andreas Dilger <fb9bfcd2d82414390637ce05921b7d9f9341a408@intel.com>
Reviewed-by: Bobi Jam <5e451d3f5f035e14a83905a8d5b052763fc3f4cb@gmail.com>
Signed-off-by: Peng Tao <4fb2b5cc20694ed9d470f738b651303a1e636b2d@emc.com>
Signed-off-by: Andreas Dilger <fb9bfcd2d82414390637ce05921b7d9f9341a408@intel.com>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs