From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: [PATCH 1/2] reiserfs: remove reiserfs_permission_locked Date: Sun, 15 Jan 2006 18:19:29 +0100 Message-ID: <20060115171929.GA15110@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from verein.lst.de ([213.95.11.210]:43980 "EHLO mail.lst.de") by vger.kernel.org with ESMTP id S932094AbWAORTf (ORCPT ); Sun, 15 Jan 2006 12:19:35 -0500 To: jeffm@suse.com, mason@suse.com, akpm@osdl.org Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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 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);