Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 21e4a495 authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Sayali Lokhande
Browse files

f2fs: call f2fs_balance_fs outside of locked page



Otherwise, we can hit deadlock by waiting for the locked page in
move_data_block in GC.

 Thread A                     Thread B
 - do_page_mkwrite
  - f2fs_vm_page_mkwrite
   - lock_page
                              - f2fs_balance_fs
                                  - mutex_lock(gc_mutex)
                               - f2fs_gc
                                - do_garbage_collect
                                 - ra_data_block
                                  - grab_cache_page
   - f2fs_balance_fs
    - mutex_lock(gc_mutex)

Change-Id: I2f84aac820b5b25b691f05e42fc5e5a4071811a0
Fixes: 39a8695824510 ("f2fs: refactor ->page_mkwrite() flow")
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Git-commit: b485ba61ef7c8dd7a1bb54f327e5914676860616
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/


Signed-off-by: default avatarSayali Lokhande <sayalil@codeaurora.org>
parent cfea929f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment