mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
librbd: get_parent_info should protect against invalid parent
get_parent_info should return -ENOENT if the image does not
have an associated parent image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 21afd0ef8e
)
This commit is contained in:
parent
28787d2184
commit
572a2f5707
@ -1426,6 +1426,9 @@ reprotect_and_return_err:
|
||||
|
||||
RWLock::RLocker l(ictx->snap_lock);
|
||||
RWLock::RLocker l2(ictx->parent_lock);
|
||||
if (ictx->parent == NULL) {
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
parent_spec parent_spec;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user