]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/f2fs/node.c
f2fs: check the node block address of newly allocated nid
authorJaegeuk Kim <jaegeuk@kernel.org>
Sun, 16 Aug 2015 20:04:50 +0000 (13:04 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 20 Aug 2015 16:00:14 +0000 (09:00 -0700)
commit24928634f81b1592e83b37dcd89ed45c28f12feb
tree41ae5bc8bbb6b21f79bed92a59b5bd8cec99242d
parenta21c20f0c812925085204fced932ac95f2a76bf0
f2fs: check the node block address of newly allocated nid

This patch adds a routine which checks the block address of newly allocated nid.
If an nid has already allocated by other thread due to subtle data races, it
will result in filesystem corruption.
So, it needs to check whether its block address was already allocated or not
in prior to nid allocation as the last chance.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/node.c