From: Christoph Hellwig <hch@lst.de>
To: jeffm@suse.com, mason@suse.com, akpm@osdl.org
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/2] reiserfs: remove reiserfs_permission_locked
Date: Sun, 15 Jan 2006 18:19:29 +0100 [thread overview]
Message-ID: <20060115171929.GA15110@lst.de> (raw)
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>
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);
reply other threads:[~2006-01-15 17:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060115171929.GA15110@lst.de \
--to=hch@lst.de \
--cc=akpm@osdl.org \
--cc=jeffm@suse.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mason@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).