reiserfs: eliminate per-super xattr lock
With the switch to using inode->i_mutex locking during lookups/creation in the xattr root, the per-super xattr lock is no longer needed. This patch removes it. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
6c17675e1e
commit
d984561b32
@@ -2224,7 +2224,4 @@ int reiserfs_unpack(struct inode *inode, struct file *filp);
|
||||
#define reiserfs_write_lock( sb ) lock_kernel()
|
||||
#define reiserfs_write_unlock( sb ) unlock_kernel()
|
||||
|
||||
/* xattr stuff */
|
||||
#define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem)
|
||||
|
||||
#endif /* _LINUX_REISER_FS_H */
|
||||
|
||||
@@ -403,9 +403,6 @@ struct reiserfs_sb_info {
|
||||
spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */
|
||||
struct dentry *priv_root; /* root of /.reiserfs_priv */
|
||||
struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */
|
||||
#ifdef CONFIG_REISERFS_FS_XATTR
|
||||
struct rw_semaphore xattr_dir_sem;
|
||||
#endif
|
||||
int j_errno;
|
||||
#ifdef CONFIG_QUOTA
|
||||
char *s_qf_names[MAXQUOTAS];
|
||||
|
||||
@@ -67,45 +67,27 @@ extern struct reiserfs_xattr_handler user_handler;
|
||||
extern struct reiserfs_xattr_handler trusted_handler;
|
||||
extern struct reiserfs_xattr_handler security_handler;
|
||||
|
||||
static inline void reiserfs_write_lock_xattrs(struct super_block *sb)
|
||||
{
|
||||
down_write(&REISERFS_XATTR_DIR_SEM(sb));
|
||||
}
|
||||
static inline void reiserfs_write_unlock_xattrs(struct super_block *sb)
|
||||
{
|
||||
up_write(&REISERFS_XATTR_DIR_SEM(sb));
|
||||
}
|
||||
static inline void reiserfs_read_lock_xattrs(struct super_block *sb)
|
||||
{
|
||||
down_read(&REISERFS_XATTR_DIR_SEM(sb));
|
||||
}
|
||||
|
||||
static inline void reiserfs_read_unlock_xattrs(struct super_block *sb)
|
||||
{
|
||||
up_read(&REISERFS_XATTR_DIR_SEM(sb));
|
||||
}
|
||||
|
||||
static inline void reiserfs_write_lock_xattr_i(struct inode *inode)
|
||||
{
|
||||
down_write(&REISERFS_I(inode)->xattr_sem);
|
||||
down_write(&REISERFS_I(inode)->i_xattr_sem);
|
||||
}
|
||||
static inline void reiserfs_write_unlock_xattr_i(struct inode *inode)
|
||||
{
|
||||
up_write(&REISERFS_I(inode)->xattr_sem);
|
||||
up_write(&REISERFS_I(inode)->i_xattr_sem);
|
||||
}
|
||||
static inline void reiserfs_read_lock_xattr_i(struct inode *inode)
|
||||
{
|
||||
down_read(&REISERFS_I(inode)->xattr_sem);
|
||||
down_read(&REISERFS_I(inode)->i_xattr_sem);
|
||||
}
|
||||
|
||||
static inline void reiserfs_read_unlock_xattr_i(struct inode *inode)
|
||||
{
|
||||
up_read(&REISERFS_I(inode)->xattr_sem);
|
||||
up_read(&REISERFS_I(inode)->i_xattr_sem);
|
||||
}
|
||||
|
||||
static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
|
||||
{
|
||||
init_rwsem(&REISERFS_I(inode)->xattr_sem);
|
||||
init_rwsem(&REISERFS_I(inode)->i_xattr_sem);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user