OSDN Git Service

gfs2: Don't withdraw under a spin lock
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 7 Jun 2018 10:56:46 +0000 (11:56 +0100)
committerBob Peterson <rpeterso@redhat.com>
Thu, 21 Jun 2018 12:39:44 +0000 (07:39 -0500)
commit9e1a9ecd13b9bb421c88135b178577caf4d54f6a
treebe518fb982b7f8f47c3ed3fa864772d4dd974985
parentf85c10e24ab9fd8ccb6de3d6061a3110ff3581df
gfs2: Don't withdraw under a spin lock

In two places, the gfs2_io_error_bh macro is called while holding the
sd_ail_lock spin lock.  This isn't allowed because gfs2_io_error_bh
withdraws the filesystem, which can sleep because it issues a uevent.
To fix that, add a gfs2_io_error_bh_wd macro that does withdraw the
filesystem and change gfs2_io_error_bh to not withdraw the filesystem.
In those places where the new gfs2_io_error_bh is used, withdraw the
filesystem after releasing sd_ail_lock.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andrew Price <anprice@redhat.com>
fs/gfs2/log.c
fs/gfs2/lops.c
fs/gfs2/meta_io.c
fs/gfs2/util.c
fs/gfs2/util.h