Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758455AbYCUO77 (ORCPT ); Fri, 21 Mar 2008 10:59:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754330AbYCUO7u (ORCPT ); Fri, 21 Mar 2008 10:59:50 -0400 Received: from fxip-0047f.externet.hu ([88.209.222.127]:37919 "EHLO pomaz-ex.szeredi.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbYCUO7t (ORCPT ); Fri, 21 Mar 2008 10:59:49 -0400 To: haveblue@us.ibm.com CC: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, neilb@suse.de, akpm@linux-foundation.org, viro@ZenIV.linux.org.uk, hch@infradead.org Subject: r-o bind in nfsd Message-Id: From: Miklos Szeredi Date: Fri, 21 Mar 2008 15:59:44 +0100 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 961 Lines: 20 Why is it that in fs/nfsd/vfs.c only vfs_mknod() and vfs_rename() are surrounded by mnt_want_write/mnt_drop_write, and not the other operations (vfs_create, vfs_mkdir, vfs_symlink, ...)? I noticed this while looking at the AppArmor patches, which need to pass the vfsmount down to the security module. And I'm wondering, why can't mnt_want_write() and mnt_drop_write() be done _inside_ vfs_foo()? I know there are a few cases, where filesystems call vfs_foo() internally, where the vfsmount isn't available, but I think the proper solution is just to fix those places, and not recurse back into the VFS (which is AFAICS in all those cases totally unnecessary anyway). This would make everybody happy, no? Miklos -- 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/