]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: Fix allocation error bug with recursive rgrp glocking
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 31 May 2018 12:20:55 +0000 (07:20 -0500)
committerBob Peterson <rpeterso@redhat.com>
Mon, 4 Jun 2018 12:33:17 +0000 (07:33 -0500)
commit33edf534ce45f9c2589aff88711f5152c361d5ac
treec8c39b17301ea54c80aa5faeed83b3bf501299c2
parent51bba9f0cb3f95684c1a04b8a37ee02b6546168b
GFS2: Fix allocation error bug with recursive rgrp glocking

Before this patch function gfs2_write_begin, upon discovering an
error, called gfs2_trim_blocks while the rgrp glock was still held.
That's because gfs2_inplace_release is not called until later.
This patch reorganizes the logic a bit so gfs2_inplace_release
is called to release the lock prior to the call to gfs2_trim_blocks,
thus preventing the glock recursion.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/aops.c