summaryrefslogtreecommitdiffstats
path: root/sys/fs/ext2fs
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-02-17 19:09:06 +0000
committerpfg <pfg@FreeBSD.org>2016-02-17 19:09:06 +0000
commitbdaba1774dae36cadfb71e549a51d42677155f62 (patch)
tree5014065ae6b31dd1d53d4b776f2abd113cfe62d8 /sys/fs/ext2fs
parentefd4fe5452c6487edb2d6291278f022cd05d2296 (diff)
downloadFreeBSD-src-bdaba1774dae36cadfb71e549a51d42677155f62.zip
FreeBSD-src-bdaba1774dae36cadfb71e549a51d42677155f62.tar.gz
MFC r295616:
ext2fs: Remove panics for rename() race conditions. Sync with r84642 from UFS: The panics are inappropriate because the IN_RENAME flag only fixes a few of the huge number of race conditions that can result in the source path becoming invalid even prior to the VOP_RENAME() call. Approved by: re (glebius)
Diffstat (limited to 'sys/fs/ext2fs')
-rw-r--r--sys/fs/ext2fs/ext2_vnops.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c
index f5dc3b2..eea65d2 100644
--- a/sys/fs/ext2fs/ext2_vnops.c
+++ b/sys/fs/ext2fs/ext2_vnops.c
@@ -985,10 +985,10 @@ abortit:
dp = VTOI(fdvp);
} else {
/*
- * From name has disappeared.
+ * From name has disappeared. IN_RENAME is not sufficient
+ * to protect against directory races due to timing windows,
+ * so we can't panic here.
*/
- if (doingdirectory)
- panic("ext2_rename: lost dir entry");
vrele(ap->a_fvp);
return (0);
}
@@ -1003,8 +1003,11 @@ abortit:
* rename.
*/
if (xp != ip) {
- if (doingdirectory)
- panic("ext2_rename: lost dir entry");
+ /*
+ * From name resolves to a different inode. IN_RENAME is
+ * not sufficient protection against timing window races
+ * so we can't panic here.
+ */
} else {
/*
* If the source is a directory with a
OpenPOWER on IntegriCloud