Re: 2.6.6-rc2-mm1

From: Christoph Hellwig
Date: Fri Apr 23 2004 - 07:15:09 EST


On Thu, Apr 22, 2004 at 11:32:39PM +0800, raven@xxxxxxxxxx wrote:
> +static int __may_umount_tree(struct vfsmount *mnt, int root_mnt_only)
> +{
> + struct list_head *next;
> + struct vfsmount *this_parent = mnt;
> + int actual_refs;
> + int minimum_refs;
> +
> + spin_lock(&vfsmount_lock);
> + actual_refs = atomic_read(&mnt->mnt_count);
> + minimum_refs = 2;
> +
> + if (root_mnt_only) {
> + spin_unlock(&vfsmount_lock);
> + if (actual_refs > minimum_refs)
> + return -EBUSY;
> + return 0;

Sorry for changing my opionin, but I somehow thought autofs3 could make
more use of this function. it it's really just a single atomic_read that's
shared it doesn't really make a lot of sense, does it?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/