]> git.ipfire.org Git - people/ms/linux.git/commit - fs/reiserfs/journal.c
reiserfs: locking, handle nested locks properly
authorJeff Mahoney <jeffm@suse.com>
Thu, 8 Aug 2013 21:34:46 +0000 (17:34 -0400)
committerJeff Mahoney <jeffm@suse.de>
Thu, 8 Aug 2013 21:34:46 +0000 (17:34 -0400)
commit278f6679f454bf185a07d9a4ca355b153482d17a
treeffead073e67cfdc1ddfc3949ebc93c06dcaaab8f
parent4c05141df57f4ffc1a9a28f1925434924179bfe4
reiserfs: locking, handle nested locks properly

The reiserfs write lock replaced the BKL and uses similar semantics.

Frederic's locking code makes a distinction between when the lock is nested
and when it's being acquired/released, but I don't think that's the right
distinction to make.

The right distinction is between the lock being released at end-of-use and
the lock being released for a schedule. The unlock should return the depth
and the lock should restore it, rather than the other way around as it is now.

This patch implements that and adds a number of places where the lock
should be dropped.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
13 files changed:
fs/reiserfs/bitmap.c
fs/reiserfs/dir.c
fs/reiserfs/fix_node.c
fs/reiserfs/inode.c
fs/reiserfs/ioctl.c
fs/reiserfs/journal.c
fs/reiserfs/lock.c
fs/reiserfs/namei.c
fs/reiserfs/prints.c
fs/reiserfs/reiserfs.h
fs/reiserfs/resize.c
fs/reiserfs/stree.c
fs/reiserfs/super.c