aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2009-03-30 14:02:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 15:16:38 -0400
commitd984561b326cd0fe0d1183d11b9b4fa1d011d21d (patch)
treee0487588581bccaa2b875529ed84ec5a4a254ab9 /include
parent6c17675e1e02ebde220ef639a3fb1333928ec2f4 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/reiserfs_fs.h3
-rw-r--r--include/linux/reiserfs_fs_sb.h3
-rw-r--r--include/linux/reiserfs_xattr.h28
3 files changed, 5 insertions, 29 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 6c4af98b6767..e00d240314c5 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -2224,7 +2224,4 @@ int reiserfs_unpack(struct inode *inode, struct file *filp);
2224#define reiserfs_write_lock( sb ) lock_kernel() 2224#define reiserfs_write_lock( sb ) lock_kernel()
2225#define reiserfs_write_unlock( sb ) unlock_kernel() 2225#define reiserfs_write_unlock( sb ) unlock_kernel()
2226 2226
2227/* xattr stuff */
2228#define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem)
2229
2230#endif /* _LINUX_REISER_FS_H */ 2227#endif /* _LINUX_REISER_FS_H */
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index cbb8868e844e..c8aee41ccc23 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -403,9 +403,6 @@ struct reiserfs_sb_info {
403 spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */ 403 spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */
404 struct dentry *priv_root; /* root of /.reiserfs_priv */ 404 struct dentry *priv_root; /* root of /.reiserfs_priv */
405 struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */ 405 struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */
406#ifdef CONFIG_REISERFS_FS_XATTR
407 struct rw_semaphore xattr_dir_sem;
408#endif
409 int j_errno; 406 int j_errno;
410#ifdef CONFIG_QUOTA 407#ifdef CONFIG_QUOTA
411 char *s_qf_names[MAXQUOTAS]; 408 char *s_qf_names[MAXQUOTAS];
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index 13cdd5e1cb60..65c16fa51246 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -67,45 +67,27 @@ extern struct reiserfs_xattr_handler user_handler;
67extern struct reiserfs_xattr_handler trusted_handler; 67extern struct reiserfs_xattr_handler trusted_handler;
68extern struct reiserfs_xattr_handler security_handler; 68extern struct reiserfs_xattr_handler security_handler;
69 69
70static inline void reiserfs_write_lock_xattrs(struct super_block *sb)
71{
72 down_write(&REISERFS_XATTR_DIR_SEM(sb));
73}
74static inline void reiserfs_write_unlock_xattrs(struct super_block *sb)
75{
76 up_write(&REISERFS_XATTR_DIR_SEM(sb));
77}
78static inline void reiserfs_read_lock_xattrs(struct super_block *sb)
79{
80 down_read(&REISERFS_XATTR_DIR_SEM(sb));
81}
82
83static inline void reiserfs_read_unlock_xattrs(struct super_block *sb)
84{
85 up_read(&REISERFS_XATTR_DIR_SEM(sb));
86}
87
88static inline void reiserfs_write_lock_xattr_i(struct inode *inode) 70static inline void reiserfs_write_lock_xattr_i(struct inode *inode)
89{ 71{
90 down_write(&REISERFS_I(inode)->xattr_sem); 72 down_write(&REISERFS_I(inode)->i_xattr_sem);
91} 73}
92static inline void reiserfs_write_unlock_xattr_i(struct inode *inode) 74static inline void reiserfs_write_unlock_xattr_i(struct inode *inode)
93{ 75{
94 up_write(&REISERFS_I(inode)->xattr_sem); 76 up_write(&REISERFS_I(inode)->i_xattr_sem);
95} 77}
96static inline void reiserfs_read_lock_xattr_i(struct inode *inode) 78static inline void reiserfs_read_lock_xattr_i(struct inode *inode)
97{ 79{
98 down_read(&REISERFS_I(inode)->xattr_sem); 80 down_read(&REISERFS_I(inode)->i_xattr_sem);
99} 81}
100 82
101static inline void reiserfs_read_unlock_xattr_i(struct inode *inode) 83static inline void reiserfs_read_unlock_xattr_i(struct inode *inode)
102{ 84{
103 up_read(&REISERFS_I(inode)->xattr_sem); 85 up_read(&REISERFS_I(inode)->i_xattr_sem);
104} 86}
105 87
106static inline void reiserfs_init_xattr_rwsem(struct inode *inode) 88static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
107{ 89{
108 init_rwsem(&REISERFS_I(inode)->xattr_sem); 90 init_rwsem(&REISERFS_I(inode)->i_xattr_sem);
109} 91}
110 92
111#else 93#else