summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}