mirror of
git://github.com/lxc/lxc
synced 2025-09-03 23:19:30 +00:00
Skip rootfs pinning for read-only file system.
Signed-off-by: Wei Mingzhi <weimingzhi@baidu.com>
This commit is contained in:
@@ -573,8 +573,12 @@ int lxc_rootfs_init(struct lxc_conf *conf, bool userns)
|
|||||||
PROTECT_OPEN | O_CREAT,
|
PROTECT_OPEN | O_CREAT,
|
||||||
PROTECT_LOOKUP_BENEATH,
|
PROTECT_LOOKUP_BENEATH,
|
||||||
S_IWUSR | S_IRUSR);
|
S_IWUSR | S_IRUSR);
|
||||||
if (fd_pin < 0)
|
if (fd_pin < 0) {
|
||||||
|
if (errno == EROFS) {
|
||||||
|
return log_trace_errno(0, EROFS, "Not pinning on read-only filesystem");
|
||||||
|
}
|
||||||
return syserror("Failed to pin rootfs");
|
return syserror("Failed to pin rootfs");
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("Pinned rootfs %d(.lxc_keep)", fd_pin);
|
TRACE("Pinned rootfs %d(.lxc_keep)", fd_pin);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user