Skip to content

Commit

Permalink
librbd: check return value during snap_unprotect
Browse files Browse the repository at this point in the history
This would only fail if the header object was corrupted, so it's
unlikely to occur in practice.

Signed-off-by: Josh Durgin <[email protected]>
  • Loading branch information
jdurgin committed May 6, 2014
1 parent 6f2edda commit 6ec99f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/librbd/internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,11 @@ namespace librbd {
ictx->header_oid,
snap_id,
RBD_PROTECTION_STATUS_UNPROTECTED);
if (r < 0) {
lderr(ictx->cct) << "snap_unprotect: error setting unprotected status"
<< dendl;
goto reprotect_and_return_err;
}
notify_change(ictx->md_ctx, ictx->header_oid, NULL, ictx);
return 0;

Expand Down

0 comments on commit 6ec99f7

Please sign in to comment.