From owner-cvs-src-old@FreeBSD.ORG Wed Sep 15 14:24:09 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C19DD10656C3 for ; Wed, 15 Sep 2010 14:24:09 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B0B198FC1A for ; Wed, 15 Sep 2010 14:24:09 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o8FEO99R096440 for ; Wed, 15 Sep 2010 14:24:09 GMT (envelope-from jh@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o8FEO9iQ096439 for cvs-src-old@freebsd.org; Wed, 15 Sep 2010 14:24:09 GMT (envelope-from jh@repoman.freebsd.org) Message-Id: <201009151424.o8FEO9iQ096439@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jh@repoman.freebsd.org using -f From: Jaakko Heinonen Date: Wed, 15 Sep 2010 14:23:55 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/fs/devfs devfs.h devfs_devs.c devfs_vnops.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 14:24:09 -0000 jh 2010-09-15 14:23:55 UTC FreeBSD src repository Modified files: sys/fs/devfs devfs.h devfs_devs.c devfs_vnops.c Log: SVN rev 212660 on 2010-09-15 14:23:55Z by jh Remove empty devfs directories automatically. devfs_delete() now recursively removes empty parent directories unless the DEVFS_DEL_NORECURSE flag is specified. devfs_delete() can't be called anymore with a parent directory vnode lock held because the possible parent directory deletion needs to lock the vnode. Thus we unlock the parent directory vnode in devfs_remove() before calling devfs_delete(). Call devfs_populate_vp() from devfs_symlink() and devfs_vptocnp() as now directories can get removed. Add a check for DE_DOOMED flag to devfs_populate_vp() because devfs_delete() drops dm_lock before the VI_DOOMED vnode flag gets set. This ensures that devfs_populate_vp() returns an error for directories which are in progress of deletion. Reviewed by: kib Discussed on: freebsd-current (mostly silence) Revision Changes Path 1.36 +4 -1 src/sys/fs/devfs/devfs.h 1.64 +71 -8 src/sys/fs/devfs/devfs_devs.c 1.194 +31 -8 src/sys/fs/devfs/devfs_vnops.c