]> git.baikalelectronics.ru Git - kernel.git/commit
jbd: Remove j_barrier mutex
authorJan Kara <jack@suse.cz>
Thu, 22 Dec 2011 13:52:21 +0000 (14:52 +0100)
committerJan Kara <jack@suse.cz>
Mon, 9 Jan 2012 12:52:09 +0000 (13:52 +0100)
commitf77211cc54ecfcf73ab7cadc6601b45e8afad476
tree0931a7ff6aa5c388eb40e2a97fdcebe59bbae337
parent85ae0ba2beb3caf70540fcbd421ba3569d70daad
jbd: Remove j_barrier mutex

j_barrier mutex is used for serializing different journal lock operations.  The
problem with it is that e.g. FIFREEZE ioctl results in process leaving kernel
with j_barrier mutex held which makes lockdep freak out. Also hibernation code
wants to freeze filesystem but it cannot do so because it then cannot hibernate
the system because of mutex being locked.

So we remove j_barrier mutex and use direct wait on j_barrier_count instead.
Since locking journal is a rare operation we don't have to care about fairness
or such things.

CC: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/jbd/journal.c
fs/jbd/transaction.c
include/linux/jbd.h