gfs2: Check inode generation number in delete_work_func
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 15 Jan 2020 08:54:14 +0000 (09:54 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 5 Jun 2020 18:19:21 +0000 (20:19 +0200)
commitb0dcffd8da3339ad0300587ce7030efdf2e914a9
tree2f841d0407db819765fa0275c53216cf80869bb6
parentb66648ad6dcfefd9f02b5408c1381987c090cb13
gfs2: Check inode generation number in delete_work_func

In delete_work_func, if the iopen glock still has an inode attached,
limit the inode lookup to that specific generation number: in the likely
case that the inode was deleted on the node on which the inode's link
count dropped to zero, we can skip verifying the on-disk block type and
reading in the inode.  The same applies if another node that had the
inode open managed to delete the inode before us.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c
fs/gfs2/incore.h