[PATCH 22/22] sysfs: move sysfs_assoc_lock into fs/sysfs/kobject.c and make it static

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <ebiederm@...>, <cornelia.huck@...>, <greg@...>, <stern@...>, <kay.sievers@...>, <linux-kernel@...>, <htejun@...>
Cc: Tejun Heo <htejun@...>
Date: Thursday, September 20, 2007 - 4:05 am

sysfs_assoc_lock which protects kobj <-> sd association is now only
used in fs/sysfs/kobject.c.  Move it there and make it static.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 fs/sysfs/dir.c     |    1 -
 fs/sysfs/kobject.c |    2 ++
 fs/sysfs/sysfs.h   |    1 -
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index d0eb9bf..a74ca4a 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -31,7 +31,6 @@
  */
 DEFINE_MUTEX(sysfs_op_mutex);
 DEFINE_MUTEX(sysfs_mutex);
-spinlock_t sysfs_assoc_lock = SPIN_LOCK_UNLOCKED;
 
 static spinlock_t sysfs_ino_lock = SPIN_LOCK_UNLOCKED;
 static DEFINE_IDA(sysfs_ino_ida);
diff --git a/fs/sysfs/kobject.c b/fs/sysfs/kobject.c
index 55b884b..16e10de 100644
--- a/fs/sysfs/kobject.c
+++ b/fs/sysfs/kobject.c
@@ -19,6 +19,8 @@
 
 #define to_sattr(a) container_of(a,struct subsys_attribute, attr)
 
+static spinlock_t sysfs_assoc_lock = SPIN_LOCK_UNLOCKED;
+
 static int sysfs_remove_child(struct sysfs_dirent *parent, const char *name)
 {
 	struct sysfs_dirent *sd;
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 69e1451..732b292 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -89,7 +89,6 @@ extern struct kmem_cache *sysfs_dir_cachep;
  */
 extern struct mutex sysfs_op_mutex;
 extern struct mutex sysfs_mutex;
-extern spinlock_t sysfs_assoc_lock;
 
 extern const struct file_operations sysfs_dir_operations;
 extern const struct inode_operations sysfs_dir_inode_operations;
-- 
1.5.0.3


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and dri..., Eric W. Biederman, (Thu Sep 27, 3:25 pm)
Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and dri..., Eric W. Biederman, (Wed Oct 10, 9:16 am)
Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and dri..., Eric W. Biederman, (Tue Oct 16, 7:54 pm)
Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and dri..., Eric W. Biederman, (Wed Oct 10, 5:16 pm)
[PATCH 22/22] sysfs: move sysfs_assoc_lock into fs/sysfs/kob..., Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 21/22] sysfs: kill sysfs_hash_and_remove(), Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 05/22] sysfs: implement sysfs_find_child(), Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 14/22] sysfs: s/symlink/link/g, Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 06/22] sysfs: restructure addrm helpers, Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 01/22] sysfs: make sysfs_root a pointer, Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 04/22] sysfs: make SYSFS_COPY_NAME a flag, Tejun Heo, (Thu Sep 20, 4:05 am)