From mboxrd@z Thu Jan 1 00:00:00 1970 From: hooanon05@yahoo.co.jp Subject: Re: [git pull] VFS patches Date: Tue, 20 May 2008 21:04:38 +0900 Message-ID: <13375.1211285078@jrobl> References: <20080426020221.GF5882@ZenIV.linux.org.uk> Cc: Linus Torvalds , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Al Viro Return-path: In-Reply-To: <20080426020221.GF5882@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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