Commit e859a5ee by Wei Mingzhi

Skip rootfs pinning for read-only file system.

parent 73936a0d
...@@ -573,8 +573,12 @@ int lxc_rootfs_init(struct lxc_conf *conf, bool userns) ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment