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

Skip to content
Commit f0a08e41 authored by Sayali Lokhande's avatar Sayali Lokhande
Browse files

f2fs: avoid race between gc and checkpoint in unmount path



During shutdown/unmount path, there is chance that
f2fs_umount_end gets called without or before kill_sb()
can stop gc thread. This results in assert as part of
do_checkpoint() in unmount path as gc_thread is not stopped
and dirtied some dentry (F2FS_DIRTY_DENTS is set).

unmount path :
f2fs_umount_end()
  f2fs_write_checkpoint()
    do_checkpoint()
      f2fs_bug_on(sbi, get_pages(sbi, F2FS_DIRTY_DENTS));

This change avoids race condition between f2fs_gc() and
f2fs_write_checkpoint() in unmount path using gc_mutex.

Change-Id: I98fd87792b2385422eeb5011ff57b427376f139d
Signed-off-by: default avatarSayali Lokhande <sayalil@codeaurora.org>
parent f94ba33e
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