Commit bb47cce
Andreas Gruenbacher
gfs2: gfs2_log_flush withdraw fixes
When a withdraw occurs in gfs2_log_flush() and we are left with an unsubmitted
bio, fail that bio. Otherwise, the bh's in that bio will remain locked and
gfs2_evict_inode() -> truncate_inode_pages() -> gfs2_invalidate_folio() ->
gfs2_discard() will hang trying to discard the locked bh's.
In addition, when gfs2_log_flush() fails to submit a new transaction, unpin the
buffers in the failing transaction like gfs2_remove_from_journal() does. If
any of the bd's are on the ail2 list, leave them there and do_withdraw() ->
gfs2_withdraw_glocks() -> inode_go_inval() -> truncate_inode_pages() ->
gfs2_invalidate_folio() -> gfs2_discard() will remove them. They will be freed
in gfs2_release_folio().
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>1 parent fe2c8d0 commit bb47cce
1 file changed
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
986 | | - | |
| 986 | + | |
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
990 | 990 | | |
991 | 991 | | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
992 | 998 | | |
993 | | - | |
994 | | - | |
995 | | - | |
| 999 | + | |
996 | 1000 | | |
997 | 1001 | | |
998 | 1002 | | |
999 | 1003 | | |
1000 | 1004 | | |
| 1005 | + | |
1001 | 1006 | | |
1002 | 1007 | | |
1003 | 1008 | | |
1004 | 1009 | | |
1005 | 1010 | | |
1006 | 1011 | | |
1007 | | - | |
| 1012 | + | |
1008 | 1013 | | |
1009 | 1014 | | |
1010 | 1015 | | |
1011 | | - | |
1012 | | - | |
| 1016 | + | |
| 1017 | + | |
1013 | 1018 | | |
1014 | 1019 | | |
1015 | 1020 | | |
| |||
1185 | 1190 | | |
1186 | 1191 | | |
1187 | 1192 | | |
1188 | | - | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
1189 | 1198 | | |
1190 | 1199 | | |
1191 | 1200 | | |
| |||
0 commit comments