]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
pivot_root.2: Remove bogus a bogus EBUSY error case
authorMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 30 Jul 2019 10:17:34 +0000 (12:17 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 23 Sep 2019 11:11:19 +0000 (13:11 +0200)
The note that EBUSY is given if a filesystem is already mounted
on 'Iput_old' was never really true. That restriction was in
Linux 2.3.14, but removed in Linux 2.3.99-pre6 so it never made
it to mainline.

The relevant diff in pivot_root() was:

        error = -EBUSY;
-       if (d_new_root->d_sb == root->d_sb || d_put_old->d_sb == root->d_sb)
+       if (new_nd.mnt == root_mnt || old_nd.mnt == root_mnt)
                goto out2; /* loop */
-       if (d_put_old != d_put_old->d_covers)
-               goto out2; /* mount point is busy */
        error = -EINVAL;

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/pivot_root.2

index a11a31a03151076beeb773048a4f4b922e870655..ebbd31f378b6ee459ac06940ada2b0544eb5458b 100644 (file)
@@ -115,8 +115,7 @@ may fail with any of the same errors as
 Additionally, it may fail with the following errors:
 .TP
 .B EBUSY
-\fInew_root\fP or \fIput_old\fP are on the current root filesystem,
-or a filesystem is already mounted on \fIput_old\fP.
+\fInew_root\fP or \fIput_old\fP are on the current root filesystem.
 .TP
 .B EINVAL
 .I new_root