summaryrefslogtreecommitdiff
path: root/cmd_fusemount.c
diff options
context:
space:
mode:
authorJustin Husted <sigstop@gmail.com>2019-10-08 15:57:34 -0700
committerKent Overstreet <kent.overstreet@gmail.com>2019-10-18 16:23:39 -0400
commitde151b0659d75f91fc02ae55fd6ea45caa5a3eeb (patch)
tree5ec87d5db668ef22b2806dfdf124c55a6299d2ee /cmd_fusemount.c
parent0df96db46ef77177e06be36d80e060a33a6c32da (diff)
Fix missing mode setting in fuse mkdir.
Diffstat (limited to 'cmd_fusemount.c')
-rw-r--r--cmd_fusemount.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd_fusemount.c b/cmd_fusemount.c
index 96a5234..a70f035 100644
--- a/cmd_fusemount.c
+++ b/cmd_fusemount.c
@@ -248,6 +248,9 @@ err:
static void bcachefs_fuse_mkdir(fuse_req_t req, fuse_ino_t dir,
const char *name, mode_t mode)
{
+ BUG_ON(mode & (~S_IALLUGO));
+
+ mode |= S_IFDIR;
bcachefs_fuse_mknod(req, dir, name, mode, 0);
}