]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: always pass ops array to rbd_req_sync_op()
authorAlex Elder <elder@inktank.com>
Tue, 26 Jun 2012 19:57:03 +0000 (12:57 -0700)
committerSage Weil <sage@inktank.com>
Tue, 31 Jul 2012 01:21:46 +0000 (18:21 -0700)
commita061796f76a7e37df726a537aebd0df793b79cd9
treecd6650853687e8fb4c015c359c8e497c492e6523
parentd60883a84746ce94525c832c76d8c3725582ff1d
rbd: always pass ops array to rbd_req_sync_op()

All of the callers of rbd_req_sync_op() except one pass a non-null
"ops" pointer.  The only one that does not is rbd_req_sync_read(),
which passes CEPH_OSD_OP_READ as its "opcode" and, CEPH_OSD_FLAG_READ
for "flags".

By allocating the ops array in rbd_req_sync_read() and moving the
special case code for the null ops pointer into it, it becomes
clear that much of that code is not even necessary.

In addition, the "opcode" argument to rbd_req_sync_op() is never
actually used, so get rid of that.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c