Commit f99e73a5 authored by Jinshan Xiong's avatar Jinshan Xiong Committed by Greg Kroah-Hartman

Staging: lustre: lov: check return value of lov_sub_get()

Check return value of lov_sub_get() in lov_io_read_ahead().
Signed-off-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1b301e83
...@@ -606,6 +606,8 @@ static int lov_io_read_ahead(const struct lu_env *env, ...@@ -606,6 +606,8 @@ static int lov_io_read_ahead(const struct lu_env *env,
return -EIO; return -EIO;
sub = lov_sub_get(env, lio, stripe); sub = lov_sub_get(env, lio, stripe);
if (IS_ERR(sub))
return PTR_ERR(sub);
lov_stripe_offset(loo->lo_lsm, cl_offset(obj, start), stripe, &suboff); lov_stripe_offset(loo->lo_lsm, cl_offset(obj, start), stripe, &suboff);
rc = cl_io_read_ahead(sub->sub_env, sub->sub_io, rc = cl_io_read_ahead(sub->sub_env, sub->sub_io,
......
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