freebsd-nq/sys/fs/devfs
Jaakko Heinonen 89d10571db 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)
2010-09-15 14:23:55 +00:00
..
devfs_devs.c Remove empty devfs directories automatically. 2010-09-15 14:23:55 +00:00
devfs_int.h Add MAKEDEV_NOWAIT flag to make_dev_credf(9), to create a device node 2010-05-06 19:22:50 +00:00
devfs_rule.c Add new make_dev_p(9) flag MAKEDEV_ETERNAL to inform devfs that created 2010-08-06 09:42:15 +00:00
devfs_vfsops.c Enable shared lookups and externed shared ops for devfs. 2010-08-06 09:46:53 +00:00
devfs_vnops.c Remove empty devfs directories automatically. 2010-09-15 14:23:55 +00:00
devfs.h Remove empty devfs directories automatically. 2010-09-15 14:23:55 +00:00