Commit 27884f4b authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov

libceph: drop else branches in prepare_read_data{,_cont}

Just call set_in_bvec in the non-conditional part.
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Reviewed-by: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 810313c5
...@@ -1773,10 +1773,8 @@ static int prepare_read_data(struct ceph_connection *con) ...@@ -1773,10 +1773,8 @@ static int prepare_read_data(struct ceph_connection *con)
bv.bv_page = con->bounce_page; bv.bv_page = con->bounce_page;
bv.bv_offset = 0; bv.bv_offset = 0;
set_in_bvec(con, &bv);
} else {
set_in_bvec(con, &bv);
} }
set_in_bvec(con, &bv);
con->v2.in_state = IN_S_PREPARE_READ_DATA_CONT; con->v2.in_state = IN_S_PREPARE_READ_DATA_CONT;
return 0; return 0;
} }
...@@ -1807,10 +1805,8 @@ static void prepare_read_data_cont(struct ceph_connection *con) ...@@ -1807,10 +1805,8 @@ static void prepare_read_data_cont(struct ceph_connection *con)
if (ceph_test_opt(from_msgr(con->msgr), RXBOUNCE)) { if (ceph_test_opt(from_msgr(con->msgr), RXBOUNCE)) {
bv.bv_page = con->bounce_page; bv.bv_page = con->bounce_page;
bv.bv_offset = 0; bv.bv_offset = 0;
set_in_bvec(con, &bv);
} else {
set_in_bvec(con, &bv);
} }
set_in_bvec(con, &bv);
WARN_ON(con->v2.in_state != IN_S_PREPARE_READ_DATA_CONT); WARN_ON(con->v2.in_state != IN_S_PREPARE_READ_DATA_CONT);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment