]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: fix multiple f2fs_add_link() having same name for inline dentry
authorSheng Yong <shengyong1@huawei.com>
Sat, 22 Apr 2017 02:39:20 +0000 (10:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:49:49 +0000 (14:49 +0200)
commit3a625468bd9e6a53d1078ba0a2e9c17117147183
tree5433a78420c4cefc8ee760a37b4fc32ce82496c8
parente71f099677c18c7c7d9363dc9e89d27fe4a33b06
f2fs: fix multiple f2fs_add_link() having same name for inline dentry

commit d3bb910c15d75ee3340311c64a1c05985bb663a3 upstream.

Commit 88c5c13a5027 (f2fs: fix multiple f2fs_add_link() calls having
same name) does not cover the scenario where inline dentry is enabled.
In that case, F2FS_I(dir)->task will be NULL, and __f2fs_add_link will
lookup dentries one more time.

This patch fixes it by moving the assigment of current task to a upper
level to cover both normal and inline dentry.

Fixes: 88c5c13a5027 (f2fs: fix multiple f2fs_add_link() calls having same name)
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/dir.c