lkml.org 
[lkml]   [2004]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.6-rc1-mm1
On Wed, Apr 21, 2004 at 08:31:38PM +0800, raven@themaw.net wrote:
> If it is decided to do this then would something like this be approiate
> Andrew?
>
> I have
> - renamed autofs4_may_umount to may_umount_tree and moved
> it to namespace.c
> - removed the EXPORT_SYMBOL for vfsmount_lock
> - updated autofs4 to suit
>
> It is not possible to merge the functionality of may_umount into this as,
> it stands, as autofs v3 requires a slightly different semantic. That is if
> there are submounts that are not busy then it should return -EBUSY but
> may_umount_tree would return not busy.

What about adding a paramter 'ignore_busy_submounts' and use most of the
function in common for both autofs3 and autofs4?

> + 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;
> +repeat:
> + next = this_parent->mnt_mounts.next;
> +resume:
> + while (next != &this_parent->mnt_mounts) {
> + struct vfsmount *p = list_entry(next, struct vfsmount, mnt_child);
> +
> + next = next->next;

Any chance to use list_for_each_entry here?

> + if ( !list_empty(&p->mnt_mounts) ) {

This wants a white-space fixup.

-
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 14:02    [W:0.107 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site