Commit 4bcc2422 authored by Hans de Goede's avatar Hans de Goede Committed by Zheng Zengkai
Browse files

vboxsf: Honor excl flag to the dir-inode create op

stable inclusion
from stable-5.10.59
commit 971703fc19cf578263df5cb772586ba171326985
bugzilla: 176988 https://gitee.com/openeuler/kernel/issues/I4EAR4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=971703fc19cf578263df5cb772586ba171326985



--------------------------------

commit cc3ddee9 upstream

Honor the excl flag to the dir-inode create op, instead of behaving
as if it is always set.

Note the old behavior still worked most of the time since a non-exclusive
open only calls the create op, if there is a race and the file is created
between the dentry lookup and the calling of the create call.

While at it change the type of the is_dir parameter to the
vboxsf_dir_create() helper from an int to a bool, to be consistent with
the use of bool for the excl parameter.

Fixes: 0fd16957 ("fs: Add VirtualBox guest shared folder (vboxsf) support")
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent dd628729
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment