jffs2: hold erase_completion_lock on exit
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Mon, 5 Nov 2012 18:40:14 +0000 (22:40 +0400)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Sun, 18 Nov 2012 09:59:01 +0000 (11:59 +0200)
commit2cbba75a56ea78e6876b4e2547a882f10b3fe72b
tree5a3789fbc954d829605e0bd3d5fa49bedcfcbbc9
parentd68cbdd4fb04d2b756ad53c22f36943167b16340
jffs2: hold erase_completion_lock on exit

Users of jffs2_do_reserve_space() expect they still held
erase_completion_lock after call to it. But there is a path
where jffs2_do_reserve_space() leaves erase_completion_lock unlocked.
The patch fixes it.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: stable@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
fs/jffs2/nodemgmt.c