提交 c87d0c07 编写于 作者: C Christoph Hellwig 提交者: Linus Torvalds

[PATCH] reiserfs: remove reiserfs_permission_locked

This function is completely unused since the xattr permission checking
changes.  Remove it and fold __reiserfs_permission into
reiserfs_permission.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 e5dd259f
......@@ -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);
}
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册