All of lore.kernel.org
 help / color / mirror / Atom feed
* [lustre-devel] [PATCH] Staging: lustre: lov: check return value of lov_sub_get()
@ 2016-10-20 23:33 Jinshan Xiong
  2016-10-21  7:20   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Jinshan Xiong @ 2016-10-20 23:33 UTC (permalink / raw)
  To: lustre-devel

Check return value of lov_sub_get() in lov_io_read_ahead().

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
---
 drivers/staging/lustre/lustre/lov/lov_io.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/lov_io.c
index a1d1ec9..011ab0f 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,
-- 
2.8.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [lustre-devel] [PATCH] Staging: lustre: lov: check return value of lov_sub_get()
  2016-10-20 23:33 [lustre-devel] [PATCH] Staging: lustre: lov: check return value of lov_sub_get() Jinshan Xiong
@ 2016-10-21  7:20   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2016-10-21  7:20 UTC (permalink / raw)
  To: Jinshan Xiong
  Cc: devel, Andreas Dilger, Oleg Drokin, James Simmons,
	Linux Kernel Mailing List, Lustre Development List

On Fri, Oct 21, 2016 at 07:33:52AM +0800, Jinshan Xiong wrote:
> Check return value of lov_sub_get() in lov_io_read_ahead().
> 
> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>

No reported-by: tag?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Staging: lustre: lov: check return value of lov_sub_get()
@ 2016-10-21  7:20   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2016-10-21  7:20 UTC (permalink / raw)
  To: Jinshan Xiong
  Cc: devel, Andreas Dilger, Oleg Drokin, James Simmons,
	Linux Kernel Mailing List, Lustre Development List

On Fri, Oct 21, 2016 at 07:33:52AM +0800, Jinshan Xiong wrote:
> Check return value of lov_sub_get() in lov_io_read_ahead().
> 
> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>

No reported-by: tag?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [lustre-devel] [PATCH] Staging: lustre: lov: check return value of lov_sub_get()
@ 2016-10-22  0:34 Jinshan Xiong
  0 siblings, 0 replies; 4+ messages in thread
From: Jinshan Xiong @ 2016-10-22  0:34 UTC (permalink / raw)
  To: lustre-devel

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>
---
 drivers/staging/lustre/lustre/lov/lov_io.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/lov_io.c
index a1d1ec9..011ab0f 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,
-- 
2.8.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-22  0:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-20 23:33 [lustre-devel] [PATCH] Staging: lustre: lov: check return value of lov_sub_get() Jinshan Xiong
2016-10-21  7:20 ` Greg Kroah-Hartman
2016-10-21  7:20   ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2016-10-22  0:34 [lustre-devel] " Jinshan Xiong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.