Re: [PATCH 02/24] rearrange may_open() to be r/o friendly

2007-09-20 Thread Dave Hansen
On Wed, 2007-09-19 at 18:27 +0100, Christoph Hellwig wrote: > > int permission(struct inode *inode, int mask, struct nameidata *nd) > > { > > int retval, submask; > > + struct vfsmount *mnt = NULL; > > + > > + if (nd) > > + mnt = nd->mnt; > > > > if (mask & MAY_WRITE) { >

Re: [PATCH 02/24] rearrange may_open() to be r/o friendly

2007-09-20 Thread Dave Hansen
On Wed, 2007-09-19 at 18:27 +0100, Christoph Hellwig wrote: int permission(struct inode *inode, int mask, struct nameidata *nd) { int retval, submask; + struct vfsmount *mnt = NULL; + + if (nd) + mnt = nd-mnt; if (mask MAY_WRITE) { umode_t

Re: [PATCH 02/24] rearrange may_open() to be r/o friendly

2007-09-19 Thread Christoph Hellwig
On Mon, Sep 17, 2007 at 11:27:20AM -0700, Dave Hansen wrote: > > may_open() calls vfs_permission() before it does checks for > IS_RDONLY(inode). It checks _again_ inside of vfs_permission(). > > The check inside of vfs_permission() is going away eventually. > With the mnt_want/drop_write()

Re: [PATCH 02/24] rearrange may_open() to be r/o friendly

2007-09-19 Thread Christoph Hellwig
On Mon, Sep 17, 2007 at 11:27:20AM -0700, Dave Hansen wrote: may_open() calls vfs_permission() before it does checks for IS_RDONLY(inode). It checks _again_ inside of vfs_permission(). The check inside of vfs_permission() is going away eventually. With the mnt_want/drop_write() functions,

[PATCH 02/24] rearrange may_open() to be r/o friendly

2007-09-17 Thread Dave Hansen
may_open() calls vfs_permission() before it does checks for IS_RDONLY(inode). It checks _again_ inside of vfs_permission(). The check inside of vfs_permission() is going away eventually. With the mnt_want/drop_write() functions, all of the r/o checks (except for this one) are consistently done

[PATCH 02/24] rearrange may_open() to be r/o friendly

2007-09-17 Thread Dave Hansen
may_open() calls vfs_permission() before it does checks for IS_RDONLY(inode). It checks _again_ inside of vfs_permission(). The check inside of vfs_permission() is going away eventually. With the mnt_want/drop_write() functions, all of the r/o checks (except for this one) are consistently done