Skip to content

Commit fe36b3d

Browse files
committed
fix: stop returning EINVAL on remount of detached mounts
When `RemountReadOnly` was called on a detached mount, it returned `EINVAL`. This is not the expected behavior. Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
1 parent c6279e0 commit fe36b3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/pkg/mount/v3/point.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ func (p *Point) Root() xfs.Root {
259259
// RemountReadOnly remounts the mount point as read-only.
260260
func (p *Point) RemountReadOnly() error {
261261
if p.detached {
262-
return syscall.EINVAL
262+
return nil
263263
}
264264

265265
return p.setattr(&unix.MountAttr{

0 commit comments

Comments
 (0)