]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: fix unlocked nat set cache operation
authorWanpeng Li <wanpeng.li@linux.intel.com>
Mon, 9 Mar 2015 03:00:55 +0000 (11:00 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 10 Apr 2015 22:08:39 +0000 (15:08 -0700)
commite19f935584183528d593c53182d4d38dc188c2ac
tree3d277b6e2f932be5bca5ab8735b7ae60ebf28e13
parent5f5ba215742feee3940160d1557b6f8b0d2fc54a
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: Wanpeng Li <wanpeng.li@linux.intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/node.c