提交 892abde5 编写于 作者: R Richard Weinberger

UBI: rename_volumes: Use UBI_METAONLY

By using UBI_METAONLY in rename_volumes() it is now possible to rename
an UBI volume atomically while it is open for writing.
This is useful for firmware upgrades.

Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Andrew Murray <amurray@embedded-bits.co.uk>
Signed-off-by: NRichard Weinberger <richard@nod.at>
Tested-by: NGuido Martínez <guido@vanguardiasur.com.ar>
Reviewed-by: NGuido Martínez <guido@vanguardiasur.com.ar>
Tested-by: NChristoph Fritz <chf.fritz@googlemail.com>
Tested-by: NAndrew Murray <amurray@embedded-bits.co.uk>
上级 fafdd2bf
......@@ -736,7 +736,7 @@ static int rename_volumes(struct ubi_device *ubi,
goto out_free;
}
re->desc = ubi_open_volume(ubi->ubi_num, vol_id, UBI_READWRITE);
re->desc = ubi_open_volume(ubi->ubi_num, vol_id, UBI_METAONLY);
if (IS_ERR(re->desc)) {
err = PTR_ERR(re->desc);
ubi_err(ubi, "cannot open volume %d, error %d",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册