]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
f2fs: fix error path of ->symlink
authorChao Yu <chao2.yu@samsung.com>
Thu, 22 Oct 2015 10:23:08 +0000 (18:23 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 22 Oct 2015 16:39:24 +0000 (09:39 -0700)
commita6be014e1d28339ba7c745fc4ac1efdbf6e2c1a2
tree5283cabac5f40449b10e102838a5b8b3f85ab379
parent7fee740697e0d9a57d618b6fec79e4c4e09fd606
f2fs: fix error path of ->symlink

Now, in ->symlink of f2fs, we kept the fixed invoking order between
f2fs_add_link and page_symlink since we should init node info firstly
in f2fs_add_link, then such node info can be used in page_symlink.

But we didn't fix to release meta info which was done before page_symlink
in our error path, so this will leave us corrupt symlink entry in its
parent's dentry page. Fix this issue by adding f2fs_unlink in the error
path for removing such linking.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/namei.c