Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19454
b: refs/heads/master
c: c87d0c0
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Feb 1, 2006
1 parent bbe2b2a commit fa28d68
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5dd259f78ba0fd0c7bfc5c52179dbbff3eb48aa
refs/heads/master: c87d0c07ea198db1ce451421904edd60b7d385ee
30 changes: 8 additions & 22 deletions trunk/fs/reiserfs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
2 changes: 0 additions & 2 deletions trunk/include/linux/reiserfs_xattr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fa28d68

Please sign in to comment.