[PATCH] Lock initializer unifying: Filesystems
authorThomas Gleixner <tglx@linutronix.de>
Sat, 8 Jan 2005 06:07:37 +0000 (22:07 -0800)
committerLinus Torvalds <torvalds@evo.osdl.org>
Sat, 8 Jan 2005 06:07:37 +0000 (22:07 -0800)
commit668adbc914d906a0a77957a18f53274bd8891964
tree58d588999a8fe7b3c165f7bc6c52ce9e36cdbedc
parente4955c71722c5e9dd4d9f45b42d92765427f3f8a
[PATCH] Lock initializer unifying: Filesystems

To make spinlock/rwlock initialization consistent all over the kernel,
this patch converts explicit lock-initializers into spin_lock_init() and
rwlock_init() calls.

Currently, spinlocks and rwlocks are initialized in two different ways:

  lock = SPIN_LOCK_UNLOCKED
  spin_lock_init(&lock)

  rwlock = RW_LOCK_UNLOCKED
  rwlock_init(&rwlock)

this patch converts all explicit lock initializations to
spin_lock_init() or rwlock_init(). (Besides consistency this also helps
automatic lock validators and debugging code.)

The conversion was done with a script, it was verified manually and it
was reviewed, compiled and tested as far as possible on x86, ARM, PPC.

There is no runtime overhead or actual code change resulting out of this
patch, because spin_lock_init() and rwlock_init() are macros and are
thus equivalent to the explicit initialization method.

That's the second batch of the unifying patches.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/cifs/cifsfs.c
fs/cifs/misc.c
fs/dcache.c
fs/file_table.c
fs/reiserfs/super.c
fs/xfs/linux-2.6/xfs_vfs.c