Repository navigation
Commit 9b4c0ff
ocfs2: Fix deadlock when allocating page
We cannot call grab_cache_page() when holding filesystem locks or with
a transaction started as grab_cache_page() calls page allocation with
GFP_KERNEL flag and thus page reclaim can recurse back into the filesystem
causing deadlocks or various assertion failures. We have to use
find_or_create_page() instead and pass it GFP_NOFS as we do with other
allocations.
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Tao Ma <tao.ma@oracle.com>1 parent b2b6ebf commit 9b4c0ff
3 files changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6672 | 6672 | | |
6673 | 6673 | | |
6674 | 6674 | | |
6675 | | - | |
| 6675 | + | |
6676 | 6676 | | |
6677 | 6677 | | |
6678 | 6678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
| 786 | + | |
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2960 | 2960 | | |
2961 | 2961 | | |
2962 | 2962 | | |
2963 | | - | |
| 2963 | + | |
2964 | 2964 | | |
2965 | 2965 | | |
2966 | 2966 | | |
| |||
3179 | 3179 | | |
3180 | 3180 | | |
3181 | 3181 | | |
3182 | | - | |
| 3182 | + | |
| 3183 | + | |
3183 | 3184 | | |
3184 | 3185 | | |
3185 | 3186 | | |
| |||
0 commit comments