diff options
author | Tejun Heo <htejun@gmail.com> | 2007-06-13 15:27:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:09:08 -0400 |
commit | 3007e997de91ec59af39a3f9c91595b31ae6e08b (patch) | |
tree | 4ed4df3ef3a249d2a4b562e36876fc8d4a3fabd9 /fs/sysfs/sysfs.h | |
parent | 5f9953237f684ea1778adb9d26162da00b282225 (diff) |
sysfs: use sysfs_mutex to protect the sysfs_dirent tree
As kobj sysfs dentries and inodes are gonna be made reclaimable,
i_mutex can't be used to protect sysfs_dirent tree. Use sysfs_mutex
globally instead. As the whole tree is protected with sysfs_mutex,
there is no reason to keep sysfs_rename_sem. Drop it.
While at it, add docbook comments to functions which require
sysfs_mutex locking.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index 457267721f4e..26051616ed11 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -82,7 +82,7 @@ extern void sysfs_drop_dentry(struct sysfs_dirent *sd); | |||
82 | extern int sysfs_setattr(struct dentry *dentry, struct iattr *iattr); | 82 | extern int sysfs_setattr(struct dentry *dentry, struct iattr *iattr); |
83 | 83 | ||
84 | extern spinlock_t sysfs_assoc_lock; | 84 | extern spinlock_t sysfs_assoc_lock; |
85 | extern struct rw_semaphore sysfs_rename_sem; | 85 | extern struct mutex sysfs_mutex; |
86 | extern struct super_block * sysfs_sb; | 86 | extern struct super_block * sysfs_sb; |
87 | extern const struct file_operations sysfs_dir_operations; | 87 | extern const struct file_operations sysfs_dir_operations; |
88 | extern const struct file_operations sysfs_file_operations; | 88 | extern const struct file_operations sysfs_file_operations; |