diff mbox

[09/11] rbd: drop needless test in rbd_rq_fn()

Message ID 5037AD5E.5050501@inktank.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Elder Aug. 24, 2012, 4:35 p.m. UTC
There's a test for null rq pointer inside the while loop in
rbd_rq_fn() that's not needed.  That same test already occurred
in the immediatly preceding loop condition test.

Signed-off-by: Alex Elder <elder@inktank.com>
---
 drivers/block/rbd.c |    4 ----
 1 file changed, 4 deletions(-)

Comments

Yehuda Sadeh Aug. 30, 2012, 5:41 p.m. UTC | #1
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>

On Fri, Aug 24, 2012 at 9:35 AM, Alex Elder <elder@inktank.com> wrote:
> There's a test for null rq pointer inside the while loop in
> rbd_rq_fn() that's not needed.  That same test already occurred
> in the immediatly preceding loop condition test.
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>  drivers/block/rbd.c |    4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index bb8dad7..fad4ecb 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -1462,10 +1462,6 @@ static void rbd_rq_fn(struct request_queue *q)
>                 struct rbd_req_coll *coll;
>                 struct ceph_snap_context *snapc;
>
> -               /* peek at request from block layer */
> -               if (!rq)
> -                       break;
> -
>                 dout("fetched request\n");
>
>                 /* filter out block requests we don't understand */
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index bb8dad7..fad4ecb 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1462,10 +1462,6 @@  static void rbd_rq_fn(struct request_queue *q)
 		struct rbd_req_coll *coll;
 		struct ceph_snap_context *snapc;

-		/* peek at request from block layer */
-		if (!rq)
-			break;
-
 		dout("fetched request\n");

 		/* filter out block requests we don't understand */