rbd: have __rbd_add_snap_dev() return a pointer
authorAlex Elder <elder@inktank.com>
Wed, 11 Jul 2012 01:30:10 +0000 (20:30 -0500)
committerSage Weil <sage@inktank.com>
Tue, 31 Jul 2012 01:21:45 +0000 (18:21 -0700)
commit4e891e0af0f0011c90067373c46d7228568ec079
tree8697591dc252aef8bce4a349c5f254995f8d3677
parent6139919133377652992a5fe134e22abce3e9c25e
rbd: have __rbd_add_snap_dev() return a pointer

It's not obvious whether the snapshot pointer whose address is
provided to __rbd_add_snap_dev() will be assigned by that function.
Change it to return the snapshot, or a pointer-coded errno in the
event of a failure.

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