f2fs: fix multiple f2fs_add_link() calls having same name

commit 88c5c13a50 upstream.

It turns out a stakable filesystem like sdcardfs in AOSP can trigger multiple
vfs_create() to lower filesystem. In that case, f2fs will add multiple dentries
having same name which breaks filesystem consistency.

Until upper layer fixes, let's work around by f2fs, which shows actually not
much performance regression.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jaegeuk Kim 2017-02-14 09:54:37 -08:00 • committed by Greg Kroah-Hartman
commit d00d1b71d9
2 changed files with 30 additions and 5 deletions