From owner-svn-src-all@FreeBSD.ORG Mon Nov 19 22:43:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8251D181; Mon, 19 Nov 2012 22:43:46 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5C2388FC12; Mon, 19 Nov 2012 22:43:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAJMhkcg055717; Mon, 19 Nov 2012 22:43:46 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAJMhjFF055708; Mon, 19 Nov 2012 22:43:45 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201211192243.qAJMhjFF055708@svn.freebsd.org> From: Attilio Rao Date: Mon, 19 Nov 2012 22:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243311 - in head/sys: fs/ext2fs fs/msdosfs fs/nfsclient fs/nullfs fs/unionfs gnu/fs/reiserfs nfsclient ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2012 22:43:46 -0000 Author: attilio Date: Mon Nov 19 22:43:45 2012 New Revision: 243311 URL: http://svnweb.freebsd.org/changeset/base/243311 Log: r16312 is not any longer real since many years (likely since when VFS received granular locking) but the comment present in UFS has been copied all over other filesystems code incorrectly for several times. Removes comments that makes no sense now. Reviewed by: kib MFC after: 3 days Modified: head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/nfsclient/nfs_clnode.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nullfs/null_subr.c head/sys/fs/unionfs/union_subr.c head/sys/gnu/fs/reiserfs/reiserfs_inode.c head/sys/nfsclient/nfs_node.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Mon Nov 19 21:58:14 2012 (r243310) +++ head/sys/fs/ext2fs/ext2_vfsops.c Mon Nov 19 22:43:45 2012 (r243311) @@ -905,14 +905,6 @@ ext2_vget(struct mount *mp, ino_t ino, i ump = VFSTOEXT2(mp); dev = ump->um_dev; - - /* - * If this malloc() is performed after the getnewvnode() - * it might block, leaving a vnode with a NULL v_data to be - * found by ext2_sync() if a sync happens to fire right then, - * which will cause a panic because ext2_sync() blindly - * dereferences vp->v_data (as well it should). - */ ip = malloc(sizeof(struct inode), M_EXT2NODE, M_WAITOK | M_ZERO); /* Allocate a new vnode/inode. */ Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Mon Nov 19 21:58:14 2012 (r243310) +++ head/sys/fs/msdosfs/msdosfs_denode.c Mon Nov 19 22:43:45 2012 (r243311) @@ -142,12 +142,6 @@ deget(pmp, dirclust, diroffset, depp) KASSERT((*depp)->de_diroffset == diroffset, ("wrong diroffset")); return (0); } - - /* - * Do the malloc before the getnewvnode since doing so afterward - * might cause a bogus v_data pointer to get dereferenced - * elsewhere if malloc should block. - */ ldep = malloc(sizeof(struct denode), M_MSDOSFSNODE, M_WAITOK | M_ZERO); /* Modified: head/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clnode.c Mon Nov 19 21:58:14 2012 (r243310) +++ head/sys/fs/nfsclient/nfs_clnode.c Mon Nov 19 22:43:45 2012 (r243311) @@ -122,12 +122,6 @@ ncl_nget(struct mount *mntp, u_int8_t *f *npp = VTONFS(nvp); return (0); } - - /* - * Allocate before getnewvnode since doing so afterward - * might cause a bogus v_data pointer to get dereferenced - * elsewhere if zalloc should block. - */ np = uma_zalloc(newnfsnode_zone, M_WAITOK | M_ZERO); error = getnewvnode("newnfs", mntp, &newnfs_vnodeops, &nvp); Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Mon Nov 19 21:58:14 2012 (r243310) +++ head/sys/fs/nfsclient/nfs_clport.c Mon Nov 19 22:43:45 2012 (r243311) @@ -197,12 +197,6 @@ nfscl_nget(struct mount *mntp, struct vn FREE((caddr_t)nfhp, M_NFSFH); return (0); } - - /* - * Allocate before getnewvnode since doing so afterward - * might cause a bogus v_data pointer to get dereferenced - * elsewhere if zalloc should block. - */ np = uma_zalloc(newnfsnode_zone, M_WAITOK | M_ZERO); error = getnewvnode("newnfs", mntp, &newnfs_vnodeops, &nvp); Modified: head/sys/fs/nullfs/null_subr.c ============================================================================== --- head/sys/fs/nullfs/null_subr.c Mon Nov 19 21:58:14 2012 (r243310) +++ head/sys/fs/nullfs/null_subr.c Mon Nov 19 22:43:45 2012 (r243311) @@ -236,10 +236,6 @@ null_nodeget(mp, lowervp, vpp) * duplicates later, when adding new vnode to hash. * Note that duplicate can only appear in hash if the lowervp is * locked LK_SHARED. - * - * Do the MALLOC before the getnewvnode since doing so afterward - * might cause a bogus v_data pointer to get dereferenced - * elsewhere if MALLOC should block. */ xp = malloc(sizeof(struct null_node), M_NULLFSNODE, M_WAITOK); Modified: head/sys/fs/unionfs/union_subr.c ============================================================================== --- head/sys/fs/unionfs/union_subr.c Mon Nov 19 21:58:14 2012 (r243310) +++ head/sys/fs/unionfs/union_subr.c Mon Nov 19 22:43:45 2012 (r243311) @@ -247,12 +247,6 @@ unionfs_nodeget(struct mount *mp, struct if (dvp == NULLVP) return (EINVAL); } - - /* - * Do the MALLOC before the getnewvnode since doing so afterward - * might cause a bogus v_data pointer to get dereferenced elsewhere - * if MALLOC should block. - */ unp = malloc(sizeof(struct unionfs_node), M_UNIONFSNODE, M_WAITOK | M_ZERO); Modified: head/sys/gnu/fs/reiserfs/reiserfs_inode.c ============================================================================== --- head/sys/gnu/fs/reiserfs/reiserfs_inode.c Mon Nov 19 21:58:14 2012 (r243310) +++ head/sys/gnu/fs/reiserfs/reiserfs_inode.c Mon Nov 19 22:43:45 2012 (r243311) @@ -757,13 +757,6 @@ reiserfs_iget( rmp = VFSTOREISERFS(mp); dev = rmp->rm_dev; - /* - * If this malloc() is performed after the getnewvnode() it might - * block, leaving a vnode with a NULL v_data to be found by - * reiserfs_sync() if a sync happens to fire right then, which - * will cause a panic because reiserfs_sync() blindly dereferences - * vp->v_data (as well it should). - */ reiserfs_log(LOG_DEBUG, "malloc(struct reiserfs_node)\n"); ip = malloc(sizeof(struct reiserfs_node), M_REISERFSNODE, M_WAITOK | M_ZERO); Modified: head/sys/nfsclient/nfs_node.c ============================================================================== --- head/sys/nfsclient/nfs_node.c Mon Nov 19 21:58:14 2012 (r243310) +++ head/sys/nfsclient/nfs_node.c Mon Nov 19 22:43:45 2012 (r243311) @@ -128,12 +128,6 @@ nfs_nget(struct mount *mntp, nfsfh_t *fh *npp = VTONFS(nvp); return (0); } - - /* - * Allocate before getnewvnode since doing so afterward - * might cause a bogus v_data pointer to get dereferenced - * elsewhere if zalloc should block. - */ np = uma_zalloc(nfsnode_zone, M_WAITOK | M_ZERO); error = getnewvnode("nfs", mntp, &nfs_vnodeops, &nvp); Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Mon Nov 19 21:58:14 2012 (r243310) +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Nov 19 22:43:45 2012 (r243311) @@ -1676,14 +1676,6 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags ump = VFSTOUFS(mp); dev = ump->um_dev; fs = ump->um_fs; - - /* - * If this malloc() is performed after the getnewvnode() - * it might block, leaving a vnode with a NULL v_data to be - * found by ffs_sync() if a sync happens to fire right then, - * which will cause a panic because ffs_sync() blindly - * dereferences vp->v_data (as well it should). - */ ip = uma_zalloc(uma_inode, M_WAITOK | M_ZERO); /* Allocate a new vnode/inode. */