lkml.org 
[lkml]   [2004]   [Apr]   [23]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 23 Apr 2004 13:11:49 +0100
FromChristoph Hellwig <>
SubjectRe: 2.6.6-rc2-mm1
On Thu, Apr 22, 2004 at 11:32:39PM +0800, raven@themaw.net 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:02    [from the cache]
©2003-2008