Re: [git pull] VFS patches

From: hooanon05
Date: Tue May 20 2008 - 08:05:39 EST



Hello Al,

I have a question about the commit you made last month.
When an application issues sys_oldumount(), ->umount_begin() will not be
called because the flag is 0. Is this behaviour intended?
And it it better to put the paranthesis around (flags & MNT_FORCE).


Junjiro Okajima


Al Viro:
> Tonight's pile: getting ->umount_begin() back to sanity, race fixes
> around execve(), general cleanups. Please, pull from
>
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6.git/ for-linus
>
> Shortlog:
>
> Al Viro (5):
> restore sane ->umount_begin() API
:::
> diff --git a/fs/namespace.c b/fs/namespace.c
> index 0505fb6..f48f981 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c
> @@ -1061,10 +1061,11 @@ static int do_umount(struct vfsmount *mnt, int flags)
> * about for the moment.
> */
>
> - lock_kernel();
> - if (sb->s_op->umount_begin)
> - sb->s_op->umount_begin(mnt, flags);
> - unlock_kernel();
> + if (flags & MNT_FORCE && sb->s_op->umount_begin) {
> + lock_kernel();
> + sb->s_op->umount_begin(sb);
> + unlock_kernel();
> + }
>
> /*
> * No sense to grab the lock for this test, but test itself looks
--
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/