rbd: have snap_by_name() return a snapshot
authorAlex Elder <elder@inktank.com>
Fri, 26 Apr 2013 04:15:08 +0000 (23:15 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:19:35 +0000 (21:19 -0700)
commit8b0241f85ab11c87075f9de0191acd8b546c6f6a
tree27c74b91be800ef974732473960bd4c3a7471c20
parent5655c4d940ba8dd32250ab1e4ba3db785943a28e
rbd: have snap_by_name() return a snapshot

A function called snap_by_name() ought to just look up a snapshot by
name.  It does that, but then it assigns some stuff to the rbd
device structure as well.

Change the function to do just the lookup, and have the caller do
the assignments that follow.

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