public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix reiser4 compilation for ->permission changes
@ 2004-09-13 14:02 Christoph Hellwig
  2004-09-13 14:04 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2004-09-13 14:02 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

remove reiser4 permission.  It only ends up calling generic_permission
with no additional bits so it's completely unessecary.


--- reiser4/fs/reiser4/inode_ops.c~	2004-09-13 16:01:33.692057520 +0200
+++ reiser4/fs/reiser4/inode_ops.c	2004-09-13 16:01:48.759766880 +0200
@@ -64,7 +64,6 @@
 static int reiser4_readlink(struct dentry *, char *, int);
 static int reiser4_follow_link(struct dentry *, struct nameidata *);
 static void reiser4_truncate(struct inode *);
-static int reiser4_permission(struct inode *, int, struct nameidata *);
 static int reiser4_setattr(struct dentry *, struct iattr *);
 static int reiser4_getattr(struct vfsmount *mnt, struct dentry *, struct kstat *);
 
@@ -394,22 +393,6 @@
 	reiser4_exit_context(&ctx);
 }
 
-/* ->permission() method in reiser4_inode_operations. */
-static int
-reiser4_permission(struct inode *inode /* object */ ,
-		   int mask,	/* mode bits to check permissions
-				 * for */
-		   struct nameidata *nameidata)
-{
-	/* reiser4_context creation/destruction removed from here,
-	   because permission checks currently don't require this.
-
-	   Permission plugin have to create context itself if necessary. */
-	assert("nikita-1687", inode != NULL);
-
-	return perm_chk(inode, mask, inode, mask);
-}
-
 /* common part of both unlink and rmdir. */
 static int
 unlink_file(struct inode *parent /* parent directory */ ,
@@ -615,7 +598,6 @@
 	.readlink = NULL,
 	.follow_link = NULL,
 	.truncate = reiser4_truncate,	/* d */
-	.permission = reiser4_permission,	/* d */
 	.setattr = reiser4_setattr,	/* d */
 	.getattr = reiser4_getattr,	/* d */
 };

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix reiser4 compilation for ->permission changes
  2004-09-13 14:02 [PATCH] fix reiser4 compilation for ->permission changes Christoph Hellwig
@ 2004-09-13 14:04 ` Christoph Hellwig
  2004-09-13 17:09   ` Alex Zarochentsev
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2004-09-13 14:04 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

On Mon, Sep 13, 2004 at 04:02:26PM +0200, Christoph Hellwig wrote:
> remove reiser4 permission.  It only ends up calling generic_permission
> with no additional bits so it's completely unessecary.

Actually not.  I'm lost in the CPP abuse in reiser4, sorry.  Could
someone of the namesys folks please remove all the perm_plugin mess?
->permission is the only access checking method for filesystems,
everything else is supposed to happen through LSM which may use xattr
storage in the filesystem.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix reiser4 compilation for ->permission changes
  2004-09-13 14:04 ` Christoph Hellwig
@ 2004-09-13 17:09   ` Alex Zarochentsev
  2004-09-13 17:19     ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Zarochentsev @ 2004-09-13 17:09 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: akpm, linux-kernel

On Mon, Sep 13, 2004 at 04:04:40PM +0200, Christoph Hellwig wrote:
> On Mon, Sep 13, 2004 at 04:02:26PM +0200, Christoph Hellwig wrote:
> > remove reiser4 permission.  It only ends up calling generic_permission
> > with no additional bits so it's completely unessecary.
> 

> Actually not.  I'm lost in the CPP abuse in reiser4, sorry.  Could someone of
> the namesys folks please remove all the perm_plugin mess?

yes, if you mean that check_perm() macro.  

> ->permission is the only access checking method for filesystems,
> everything else is supposed to happen through LSM which may use xattr
> storage in the filesystem.

I think what reiser4 needs is exactly the fs-specific per-object permission
check.   Is i_op->permission() going to be obsolete?   If not, ->permission()
is the best (available) way to call reiser4 permission plugin methods.  

> -
> 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/

-- 
Alex.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix reiser4 compilation for ->permission changes
  2004-09-13 17:09   ` Alex Zarochentsev
@ 2004-09-13 17:19     ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2004-09-13 17:19 UTC (permalink / raw)
  To: Alex Zarochentsev; +Cc: Christoph Hellwig, akpm, linux-kernel

On Mon, Sep 13, 2004 at 09:09:11PM +0400, Alex Zarochentsev wrote:
> > ->permission is the only access checking method for filesystems,
> > everything else is supposed to happen through LSM which may use xattr
> > storage in the filesystem.
> 
> I think what reiser4 needs is exactly the fs-specific per-object permission
> check.   Is i_op->permission() going to be obsolete?   If not, ->permission()
> is the best (available) way to call reiser4 permission plugin methods.  

Currently there is no permission checking in reiser4 that's different
from generic_permission so don't set a ->permission.  If you ever have
more checking set it for those objects that want more checking instead
of such a useless indirection.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-13 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-13 14:02 [PATCH] fix reiser4 compilation for ->permission changes Christoph Hellwig
2004-09-13 14:04 ` Christoph Hellwig
2004-09-13 17:09   ` Alex Zarochentsev
2004-09-13 17:19     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox