]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] reiserfs: remove reiserfs_permission_locked
authorChristoph Hellwig <hch@lst.de>
Wed, 1 Feb 2006 11:06:45 +0000 (03:06 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Feb 2006 16:53:25 +0000 (08:53 -0800)
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>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/reiserfs/xattr.c
include/linux/reiserfs_xattr.h

index 4f0db4e54517f05987a021348d07b9d80f06c88b..2f085845f6702a67aafca9e1c4f3b8dff0416b01 100644 (file)
@@ -1319,9 +1319,7 @@ int reiserfs_xattr_init(struct super_block *s, int mount_flags)
        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 @@ __reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd,
                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 @@ __reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd,
 
        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 c84354e8374c9978dc4e6e00938be792521aedc7..87280eb6083d44b94133c635b4916255e60b93cb 100644 (file)
@@ -43,8 +43,6 @@ int reiserfs_delete_xattrs(struct inode *inode);
 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);