From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753637Ab1JTFU3 (ORCPT ); Thu, 20 Oct 2011 01:20:29 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:42503 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753607Ab1JTFU0 (ORCPT ); Thu, 20 Oct 2011 01:20:26 -0400 From: "Aneesh Kumar K.V" To: "J. Bruce Fields" Cc: agruen@kernel.org, akpm@linux-foundation.org, viro@zeniv.linux.org.uk, dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -V7 08/26] vfs: Add new file and directory create permission flags In-Reply-To: <20111019164216.GC30864@fieldses.org> References: <1318951981-5508-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1318951981-5508-9-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <20111019164216.GC30864@fieldses.org> User-Agent: Notmuch/0.9_rc1-42-g76fdca8 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Thu, 20 Oct 2011 10:50:08 +0530 Message-ID: <87r5285jef.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii x-cbid: 11102005-6148-0000-0000-000000742CA6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Oct 2011 12:42:16 -0400, "J. Bruce Fields" wrote: > On Tue, Oct 18, 2011 at 09:02:43PM +0530, Aneesh Kumar K.V wrote: > > From: Andreas Gruenbacher > > > > Some permission models distinguish between the permission to create a > > non-directory and a directory. Pass this information down to > > inode_permission() as mask flags > ... > > diff --git a/include/linux/fs.h b/include/linux/fs.h > > index f3ebf86..60361c6 100644 > > --- a/include/linux/fs.h > > +++ b/include/linux/fs.h > > @@ -67,6 +67,8 @@ struct inodes_stat_t { > > #define MAY_CHDIR 0x00000040 > > /* called from RCU mode, don't block */ > > #define MAY_NOT_BLOCK 0x00000080 > > +#define MAY_CREATE_FILE 0x00000100 > > +#define MAY_CREATE_DIR 0x00000200 > > Hm, are the flags in fs/nfsd/vfs.h going to need fixing up? > > Looking at the nfsd code.... No, I guess it's OK, nfsd does > > err = inode_permission(inode, acc & (MAY_READ|MAY_WRITE|MAY_EXEC)); > nfsd bits need fixing once nfs starts doing richacl permission check. The changes I did can be found at https://github.com/kvaneesh/linux/commits/richacl-fullset/ > So we can wait to fix up any collisions until we need to pass these > extra bits. > Yes. And that we will do once we get the VFS and local file system changes upstream. -aneesh