gfs2: Partially revert gfs2_inode_lookup change

[ Upstream commit 88f4a9f813 ]

Commit c412a97cf6 changed delete_work_func() to always perform an
inode lookup when gfs2_try_evict() fails.  This doesn't make sense as a
gfs2_try_evict() failure indicates that the inode is likely still in
use.  Revert that change.

Fixes: c412a97cf6 ("gfs2: Use TRY lock in gfs2_inode_lookup for UNLINKED inodes")
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Andreas Gruenbacher 2022-12-05 22:27:28 +01:00 committed by Greg Kroah-Hartman
parent b8131efb89
commit 308eef3e16
1 changed files with 2 additions and 0 deletions

View File

@ -1039,6 +1039,7 @@ static void delete_work_func(struct work_struct *work)
if (gfs2_queue_delete_work(gl, 5 * HZ))
return;
}
goto out;
}
inode = gfs2_lookup_by_inum(sdp, no_addr, gl->gl_no_formal_ino,
@ -1051,6 +1052,7 @@ static void delete_work_func(struct work_struct *work)
d_prune_aliases(inode);
iput(inode);
}
out:
gfs2_glock_put(gl);
}