f2fs: fix unlocked nat set cache operation
nm_i->nat_tree_lock is used to sync both the operations of nat entry cache tree and nat set cache tree, however, it isn't held when flush nat entries during checkpoint which lead to potential race, this patch fix it by holding the lock when gang lookup nat set cache and delete item from nat set cache. Signed-off-by: NWanpeng Li <wanpeng.li@linux.intel.com> Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
Showing
想要评论请 注册 或 登录