From: Alex Elder Date: Thu, 30 Aug 2012 05:16:38 +0000 (-0500) Subject: rbd: don't register snapshots in bus_add_dev() X-Git-Tag: v3.7-rc1~90^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd789ab9cacbda1aad43304b89cff29004b793ea;p=pandora-kernel.git rbd: don't register snapshots in bus_add_dev() When rbd_bus_add_dev() is called (one spot--in rbd_add()), the rbd image header has not even been read yet. This means that the list of snapshots will be empty at the time of the call. As a result, there is no need for the code that calls rbd_register_snap_dev() for each entry in that list--so get rid of it. Once the header has been read (just after returning), a call will be made to rbd_dev_snap_devs_update(), which will then find every snapshot in the context to be new and will therefore call rbd_register_snap_dev() via __rbd_add_snap_dev() accomplishing the same thing. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- Reading git-diff-tree failed