OSDN Git Service

mirror: Fix permissions for removing mirror_top_bs
authorKevin Wolf <kwolf@redhat.com>
Mon, 6 Mar 2017 15:03:00 +0000 (16:03 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Mar 2017 13:53:28 +0000 (14:53 +0100)
commit0bf74767ff7f0ae23615162807961c5d7e73507c
tree69561abe6f440469060b87a00d3cb36db85a107c
parent7d9fcb391c7898fb1417d84eba41d3d48bd76605
mirror: Fix permissions for removing mirror_top_bs

mirror_top_bs takes write permissions on its backing file, which can
make it impossible to attach that backing file node to another parent.
However, this is exactly what needs to be done in order to remove
mirror_top_bs from the backing chain. So give up the write permission
first.

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