linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] reiserfs: remove reiserfs_permission_locked
@ 2006-01-15 17:19 Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2006-01-15 17:19 UTC (permalink / raw)
  To: jeffm, mason, akpm; +Cc: linux-fsdevel

This function is completely unused since the xattr permission checking
changes.  Remove it and fold __reiserfs_permission into
reiserfs_permission.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6.15-mm4/fs/reiserfs/xattr.c
===================================================================
--- linux-2.6.15-mm4.orig/fs/reiserfs/xattr.c	2006-01-15 12:24:08.000000000 +0100
+++ linux-2.6.15-mm4/fs/reiserfs/xattr.c	2006-01-15 18:15:20.000000000 +0100
@@ -1319,9 +1319,7 @@
 	return err;
 }
 
-static int
-__reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd,
-		      int need_lock)
+int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd)
 {
 	umode_t mode = inode->i_mode;
 
@@ -1357,15 +1355,14 @@
 		if (!(mode & S_IRWXG))
 			goto check_groups;
 
-		if (need_lock) {
-			reiserfs_read_lock_xattr_i(inode);
-			reiserfs_read_lock_xattrs(inode->i_sb);
-		}
+		reiserfs_read_lock_xattr_i(inode);
+		reiserfs_read_lock_xattrs(inode->i_sb);
+
 		acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS);
-		if (need_lock) {
-			reiserfs_read_unlock_xattrs(inode->i_sb);
-			reiserfs_read_unlock_xattr_i(inode);
-		}
+
+		reiserfs_read_unlock_xattrs(inode->i_sb);
+		reiserfs_read_unlock_xattr_i(inode);
+
 		if (IS_ERR(acl)) {
 			if (PTR_ERR(acl) == -ENODATA)
 				goto check_groups;
@@ -1414,14 +1411,3 @@
 
 	return -EACCES;
 }
-
-int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd)
-{
-	return __reiserfs_permission(inode, mask, nd, 1);
-}
-
-int
-reiserfs_permission_locked(struct inode *inode, int mask, struct nameidata *nd)
-{
-	return __reiserfs_permission(inode, mask, nd, 0);
-}
Index: linux-2.6.15-mm4/include/linux/reiserfs_xattr.h
===================================================================
--- linux-2.6.15-mm4.orig/include/linux/reiserfs_xattr.h	2006-01-15 12:22:27.000000000 +0100
+++ linux-2.6.15-mm4/include/linux/reiserfs_xattr.h	2006-01-15 12:27:00.000000000 +0100
@@ -43,8 +43,6 @@
 int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs);
 int reiserfs_xattr_init(struct super_block *sb, int mount_flags);
 int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd);
-int reiserfs_permission_locked(struct inode *inode, int mask,
-			       struct nameidata *nd);
 
 int reiserfs_xattr_del(struct inode *, const char *);
 int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-15 17:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-15 17:19 [PATCH 1/2] reiserfs: remove reiserfs_permission_locked Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).