Date: Thu, 18 Dec 2008 11:58:12 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186276 - head/sys/kern Message-ID: <200812181158.mBIBwC50039690@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Dec 18 11:58:12 2008 New Revision: 186276 URL: http://svn.freebsd.org/changeset/base/186276 Log: Do not return success and doomed vnode from lookup. LK_UPGRADE allows the vnode to be reclaimed. Tested by: pho MFC after: 1 month Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Thu Dec 18 09:59:24 2008 (r186275) +++ head/sys/kern/vfs_lookup.c Thu Dec 18 11:58:12 2008 (r186276) @@ -814,6 +814,10 @@ success: if ((cnp->cn_flags & (ISLASTCN | LOCKSHARED | LOCKLEAF)) == (ISLASTCN | LOCKLEAF) && VOP_ISLOCKED(dp) != LK_EXCLUSIVE) { vn_lock(dp, LK_UPGRADE | LK_RETRY); + if (dp->v_iflag & VI_DOOMED) { + error = ENOENT; + goto bad2; + } } if (vfslocked && dvfslocked) VFS_UNLOCK_GIANT(dvfslocked); /* Only need one */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812181158.mBIBwC50039690>