Date: Wed, 17 Feb 2016 19:11:09 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r295715 - stable/9/sys/fs/ext2fs Message-ID: <201602171911.u1HJB9vG032235@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Wed Feb 17 19:11:09 2016 New Revision: 295715 URL: https://svnweb.freebsd.org/changeset/base/295715 Log: 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. Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vnops.c Wed Feb 17 19:09:06 2016 (r295714) +++ stable/9/sys/fs/ext2fs/ext2_vnops.c Wed Feb 17 19:11:09 2016 (r295715) @@ -988,10 +988,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); } @@ -1006,8 +1006,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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602171911.u1HJB9vG032235>