vboxsf: Honor excl flag to the dir-inode create op
authorHans de Goede <hdegoede@redhat.com>
Thu, 21 Jan 2021 09:08:59 +0000 (10:08 +0100)
committerHans de Goede <hdegoede@redhat.com>
Wed, 23 Jun 2021 12:36:36 +0000 (14:36 +0200)
commitcc3ddee97cff034cea4d095de4a484c92a219bf5
tree9b564f9acb09770f48c0d967a6273d76d175dea0
parent6efb943b8616ec53a5e444193dccf1af9ad627b5
vboxsf: Honor excl flag to the dir-inode create op

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: 0fd169576648 ("fs: Add VirtualBox guest shared folder (vboxsf) support")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
fs/vboxsf/dir.c