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)
commit913d2fdcf60576cbbd82969fcb2bc78a4d59ba33
treecd6650853687e8fb4c015c359c8e497c492e6523
parentd67d4be56a3ec8d07b1f29aab6095b363085b028
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