diff options
author | Christoph Hellwig <hch@lst.de> | 2006-02-01 06:06:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 11:53:25 -0500 |
commit | c87d0c07ea198db1ce451421904edd60b7d385ee (patch) | |
tree | c6c58f49d3c9bf8fab0c27cf8335028f17614470 | |
parent | e5dd259f78ba0fd0c7bfc5c52179dbbff3eb48aa (diff) |
[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: 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>
-rw-r--r-- | fs/reiserfs/xattr.c | 30 | ||||
-rw-r--r-- | include/linux/reiserfs_xattr.h | 2 |
2 files changed, 8 insertions, 24 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 4f0db4e54517..2f085845f670 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -1319,9 +1319,7 @@ int reiserfs_xattr_init(struct super_block *s, int mount_flags) | |||
1319 | return err; | 1319 | return err; |
1320 | } | 1320 | } |
1321 | 1321 | ||
1322 | static int | 1322 | int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd) |
1323 | __reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd, | ||
1324 | int need_lock) | ||
1325 | { | 1323 | { |
1326 | umode_t mode = inode->i_mode; | 1324 | umode_t mode = inode->i_mode; |
1327 | 1325 | ||
@@ -1357,15 +1355,14 @@ __reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd, | |||
1357 | if (!(mode & S_IRWXG)) | 1355 | if (!(mode & S_IRWXG)) |
1358 | goto check_groups; | 1356 | goto check_groups; |
1359 | 1357 | ||
1360 | if (need_lock) { | 1358 | reiserfs_read_lock_xattr_i(inode); |
1361 | reiserfs_read_lock_xattr_i(inode); | 1359 | reiserfs_read_lock_xattrs(inode->i_sb); |
1362 | reiserfs_read_lock_xattrs(inode->i_sb); | 1360 | |
1363 | } | ||
1364 | acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS); | 1361 | acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS); |
1365 | if (need_lock) { | 1362 | |
1366 | reiserfs_read_unlock_xattrs(inode->i_sb); | 1363 | reiserfs_read_unlock_xattrs(inode->i_sb); |
1367 | reiserfs_read_unlock_xattr_i(inode); | 1364 | reiserfs_read_unlock_xattr_i(inode); |
1368 | } | 1365 | |
1369 | if (IS_ERR(acl)) { | 1366 | if (IS_ERR(acl)) { |
1370 | if (PTR_ERR(acl) == -ENODATA) | 1367 | if (PTR_ERR(acl) == -ENODATA) |
1371 | goto check_groups; | 1368 | goto check_groups; |
@@ -1414,14 +1411,3 @@ __reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd, | |||
1414 | 1411 | ||
1415 | return -EACCES; | 1412 | return -EACCES; |
1416 | } | 1413 | } |
1417 | |||
1418 | int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd) | ||
1419 | { | ||
1420 | return __reiserfs_permission(inode, mask, nd, 1); | ||
1421 | } | ||
1422 | |||
1423 | int | ||
1424 | reiserfs_permission_locked(struct inode *inode, int mask, struct nameidata *nd) | ||
1425 | { | ||
1426 | return __reiserfs_permission(inode, mask, nd, 0); | ||
1427 | } | ||
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index c84354e8374c..87280eb6083d 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -43,8 +43,6 @@ int reiserfs_delete_xattrs(struct inode *inode); | |||
43 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); | 43 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); |
44 | int reiserfs_xattr_init(struct super_block *sb, int mount_flags); | 44 | int reiserfs_xattr_init(struct super_block *sb, int mount_flags); |
45 | int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd); | 45 | int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd); |
46 | int reiserfs_permission_locked(struct inode *inode, int mask, | ||
47 | struct nameidata *nd); | ||
48 | 46 | ||
49 | int reiserfs_xattr_del(struct inode *, const char *); | 47 | int reiserfs_xattr_del(struct inode *, const char *); |
50 | int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); | 48 | int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); |