diff options
| author | 2016-10-22 08:34:49 +0800 | |
|---|---|---|
| committer | 2016-10-25 09:52:02 +0200 | |
| commit | f99e73a5e3ff556bc69e5e592fee18d4cb7600dd (patch) | |
| tree | 5f56f73243b9222349493657f43aeb88a417d418 | |
| parent | staging: lustre: remove broken dead code in cfs_cpt_table_create_pattern (diff) | |
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>
| -rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_io.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/lov_io.c index a1d1ec9dd72e..011ab0f3ccc1 100644 --- a/drivers/staging/lustre/lustre/lov/lov_io.c +++ b/drivers/staging/lustre/lustre/lov/lov_io.c @@ -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, |
