summaryrefslogtreecommitdiff
path: root/fs/reiserfs/xattr_user.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-09 20:51:59 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 08:01:30 -0800
commitb98932cb514eef404c6168c9a15cf28851498dea (patch)
tree445c3d1b2510dec9ba5caf38e9e44e1d96a712cb /fs/reiserfs/xattr_user.c
parentc37ef806a3e1c0bca65fd03b7590d56d19625da4 (diff)
[PATCH] remove reiserfs xattr permission checks
remove checks now in the VFS Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/reiserfs/xattr_user.c')
-rw-r--r--fs/reiserfs/xattr_user.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/fs/reiserfs/xattr_user.c b/fs/reiserfs/xattr_user.c
index 51458048ca6..073f39364b1 100644
--- a/fs/reiserfs/xattr_user.c
+++ b/fs/reiserfs/xattr_user.c
@@ -16,18 +16,10 @@ static int
user_get(struct inode *inode, const char *name, void *buffer, size_t size)
{
- int error;
-
if (strlen(name) < sizeof(XATTR_USER_PREFIX))
return -EINVAL;
-
if (!reiserfs_xattrs_user(inode->i_sb))
return -EOPNOTSUPP;
-
- error = reiserfs_permission_locked(inode, MAY_READ, NULL);
- if (error)
- return error;
-
return reiserfs_xattr_get(inode, name, buffer, size);
}
@@ -36,43 +28,21 @@ user_set(struct inode *inode, const char *name, const void *buffer,
size_t size, int flags)
{
- int error;
-
if (strlen(name) < sizeof(XATTR_USER_PREFIX))
return -EINVAL;
if (!reiserfs_xattrs_user(inode->i_sb))
return -EOPNOTSUPP;
-
- if (!S_ISREG(inode->i_mode) &&
- (!S_ISDIR(inode->i_mode) || inode->i_mode & S_ISVTX))
- return -EPERM;
-
- error = reiserfs_permission_locked(inode, MAY_WRITE, NULL);
- if (error)
- return error;
-
return reiserfs_xattr_set(inode, name, buffer, size, flags);
}
static int user_del(struct inode *inode, const char *name)
{
- int error;
-
if (strlen(name) < sizeof(XATTR_USER_PREFIX))
return -EINVAL;
if (!reiserfs_xattrs_user(inode->i_sb))
return -EOPNOTSUPP;
-
- if (!S_ISREG(inode->i_mode) &&
- (!S_ISDIR(inode->i_mode) || inode->i_mode & S_ISVTX))
- return -EPERM;
-
- error = reiserfs_permission_locked(inode, MAY_WRITE, NULL);
- if (error)
- return error;
-
return 0;
}