Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-4423 lov: check return value of lov_sub_get()
[fs/lustre-release.git]
/
lustre
/
lov
/
lov_io.c
diff --git
a/lustre/lov/lov_io.c
b/lustre/lov/lov_io.c
index
a0ee8e9
..
56e1ba1
100644
(file)
--- a/
lustre/lov/lov_io.c
+++ b/
lustre/lov/lov_io.c
@@
-587,6
+587,8
@@
static int lov_io_read_ahead(const struct lu_env *env,
RETURN(-EIO);
sub = lov_sub_get(env, lio, stripe);
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,
lov_stripe_offset(loo->lo_lsm, cl_offset(obj, start), stripe, &suboff);
rc = cl_io_read_ahead(sub->sub_env, sub->sub_io,