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: Jinshan Xiong <jinshan.xiong@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1b301e8343
commit
f99e73a5e3
|
@ -606,6 +606,8 @@ static int lov_io_read_ahead(const struct lu_env *env,
|
|||
return -EIO;
|
||||
|
||||
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);
|
||||
rc = cl_io_read_ahead(sub->sub_env, sub->sub_io,
|
||||
|
|
Loading…
Reference in New Issue