OSDN Git Service

block: Handle permission errors in change_parent_backing_link()
authorKevin Wolf <kwolf@redhat.com>
Thu, 2 Mar 2017 17:43:00 +0000 (18:43 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Mar 2017 13:53:28 +0000 (14:53 +0100)
commit234ac1a9025bcfcc532449f72a97b3d4754d466c
tree3497b9e687a0575de82e3aeecd0d303c74b9b6ca
parent46181129eac9a56d9a948667282dd03d5015f096
block: Handle permission errors in change_parent_backing_link()

Instead of just trying to change parents by parent over to reference @to
instead of @from, and abort()ing whenever the permissions don't allow
this, do proper permission checking beforehand and pass any error to the
callers.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block.c