Commit cf9da270 authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman

staging: lustre: lov: avoid infinite loop in lsm_alloc_plain()

In lsm_alloc_plain() use a signed loop index to avoid an infinite loop
in the error path.
Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6872
Reviewed-on: http://review.whamcloud.com/15644Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e273d543
...@@ -81,7 +81,7 @@ struct lov_stripe_md *lsm_alloc_plain(u16 stripe_count) ...@@ -81,7 +81,7 @@ struct lov_stripe_md *lsm_alloc_plain(u16 stripe_count)
size_t oinfo_ptrs_size, lsm_size; size_t oinfo_ptrs_size, lsm_size;
struct lov_stripe_md *lsm; struct lov_stripe_md *lsm;
struct lov_oinfo *loi; struct lov_oinfo *loi;
unsigned int i; int i;
LASSERT(stripe_count <= LOV_MAX_STRIPE_COUNT); LASSERT(stripe_count <= LOV_MAX_STRIPE_COUNT);
......
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