summaryrefslogtreecommitdiff
path: root/fs/autofs4/root.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-10-26 08:34:40 +0400
committerAlex Elder <elder@inktank.com>2012-10-30 17:34:28 +0400
commit41f38c2b2f8b66b176a0e548ef06294343a7bfa2 (patch)
tree6d577c2ac2a8a7b3fca878d9030dc9faa6226e4a /fs/autofs4/root.c
parentf7760dad286829682a8d36f4563ab20a65732414 (diff)
downloadlinux-41f38c2b2f8b66b176a0e548ef06294343a7bfa2.tar.xz
rbd: remove snapshots on error in rbd_add()
If rbd_dev_snaps_update() has ever been called for an rbd device structure there could be snapshot structures on its snaps list. In rbd_add(), this function is called but a subsequent error path neglected to clean up any of these snapshots. Add a call to rbd_remove_all_snaps() in the appropriate spot to remedy this. Change a couple of error labels to be a little clearer while there. Drop the leading underscores from the function name; there's nothing special about that function that they might signify. As suggested in review, the leading underscores in __rbd_remove_snap_dev() have been removed as well. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'fs/autofs4/root.c')
0 files changed, 0 insertions, 0 deletions