* [PATCH] libceph: drop else branches in prepare_read_data{,_cont}
@ 2022-02-14 11:22 Jeff Layton
0 siblings, 0 replies; only message in thread
From: Jeff Layton @ 2022-02-14 11:22 UTC (permalink / raw)
To: ceph-devel; +Cc: idryomov
Just call set_in_bvec in the non-conditional part.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
net/ceph/messenger_v2.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/net/ceph/messenger_v2.c b/net/ceph/messenger_v2.c
index c81379f93ad5..c6e5bfc717d5 100644
--- a/net/ceph/messenger_v2.c
+++ b/net/ceph/messenger_v2.c
@@ -1773,10 +1773,8 @@ static int prepare_read_data(struct ceph_connection *con)
bv.bv_page = con->bounce_page;
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;
return 0;
}
@@ -1807,10 +1805,8 @@ static void prepare_read_data_cont(struct ceph_connection *con)
if (ceph_test_opt(from_msgr(con->msgr), RXBOUNCE)) {
bv.bv_page = con->bounce_page;
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);
return;
}
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-14 11:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-14 11:22 [PATCH] libceph: drop else branches in prepare_read_data{,_cont} Jeff Layton
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.