]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
locks: eliminate BUG() call when there's an unexpected lock on file close
authorJeff Layton <jlayton@redhat.com>
Mon, 3 Feb 2014 17:13:07 +0000 (12:13 -0500)
committerJiri Slaby <jslaby@suse.cz>
Sat, 6 Dec 2014 15:02:10 +0000 (16:02 +0100)
commitcac69a82453f8cf8097d0550d53942c5333f07de
tree85ef9752aa6241dd71ceaff6fad0f298d939ac20
parent021e15481284fe72834def5cb456dcfd8b7d9529
locks: eliminate BUG() call when there's an unexpected lock on file close

commit 8c3cac5e6a85f03602ffe09c44f14418699e31ec upstream.

A leftover lock on the list is surely a sign of a problem of some sort,
but it's not necessarily a reason to panic the box. Instead, just log a
warning with some info about the lock, and then delete it like we would
any other lock.

In the event that the filesystem declares a ->lock f_op, we may end up
leaking something, but that's generally preferable to an immediate
panic.

Acked-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Markus Blank-Burian <burian@muenster.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/locks.c