2007-12-10 19:03:32

by Matthias Kaehlcke

[permalink] [raw]
Subject: [PATCH] fs/sysfs/file.c: use DEFINE_SPINLOCK for sysfs_open_dirent_lock definition

fs/sysfs/file.c: use DEFINE_SPINLOCK for definition of
sysfs_open_dirent_lock instead of assigning SPIN_LOCK_UNLOCKED

Signed-off-by: Matthias Kaehlcke <[email protected]>

--

diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 4045bdc..09a0611 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -66,7 +66,7 @@ static struct sysfs_ops subsys_sysfs_ops = {
* sysfs_dirent->s_attr.open points to sysfs_open_dirent. s_attr.open
* is protected by sysfs_open_dirent_lock.
*/
-static spinlock_t sysfs_open_dirent_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sysfs_open_dirent_lock);

struct sysfs_open_dirent {
atomic_t refcnt;

--
Matthias Kaehlcke
Linux System Developer
Barcelona

La libertad es como la ma?ana. Hay quienes esperan dormidos a que
llegue, pero hay quienes desvelan y caminan la noche para alcanzarla
(Subcomandante Marcos)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-


2007-12-10 19:19:25

by Jiri Slaby

[permalink] [raw]
Subject: Re: [PATCH] fs/sysfs/file.c: use DEFINE_SPINLOCK for sysfs_open_dirent_lock definition

On 12/10/2007 08:03 PM, Matthias Kaehlcke wrote:
> fs/sysfs/file.c: use DEFINE_SPINLOCK for definition of
> sysfs_open_dirent_lock instead of assigning SPIN_LOCK_UNLOCKED

Already done:
http://lkml.org/lkml/2007/11/9/222

regards,
--js