Commit acf1f42
Andreas Gruenbacher
gfs2: Fix "Make glock lru list scanning safer"
Commit 228804a tried to add a refcount check to
gfs2_scan_glock_lru() to make sure that glocks that are still referenced
cannot be freed. It failed to account for the bias state_change() adds
to the refcount for held glocks, so held glocks are no longer removed
from the glock cache, which can lead to out-of-memory problems. Fix
that. (The inodes those glocks are associated with do get shrunk and do
get pushed out of memory.)
In addition, use the same eligibility check in gfs2_scan_glock_lru() and
gfs2_dispose_glock_lru().
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>1 parent c9a0a4b commit acf1f42
1 file changed
Lines changed: 13 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1987 | 1987 | | |
1988 | 1988 | | |
1989 | 1989 | | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
1990 | 1998 | | |
1991 | 1999 | | |
1992 | 2000 | | |
| |||
2020 | 2028 | | |
2021 | 2029 | | |
2022 | 2030 | | |
2023 | | - | |
| 2031 | + | |
2024 | 2032 | | |
2025 | 2033 | | |
2026 | 2034 | | |
| |||
2052 | 2060 | | |
2053 | 2061 | | |
2054 | 2062 | | |
2055 | | - | |
2056 | | - | |
2057 | | - | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | | - | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
2065 | 2067 | | |
2066 | 2068 | | |
2067 | 2069 | | |
| |||
0 commit comments