]> git.ipfire.org Git - thirdparty/man-pages.git/commit
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)
commit071505e9fbf45964db8a04b4fd10abe2a6e92749
tree1cb774caeecb4895abc96b9113630edd3b3c18e2
parent43d438e29bb47767c3fa49c33127f16e17332055
pivot_root.2: Remove bogus a bogus EBUSY error case

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