]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
Fix missing mode setting in fuse mkdir.
authorJustin Husted <sigstop@gmail.com>
Tue, 8 Oct 2019 22:57:34 +0000 (15:57 -0700)
committerKent Overstreet <kent.overstreet@gmail.com>
Fri, 18 Oct 2019 20:23:39 +0000 (16:23 -0400)
cmd_fusemount.c

index 96a52344747d43a0e18722bb7d10467de370ff27..a70f035bc70a36bc9e2fd716a9b496ca84c37b4d 100644 (file)
@@ -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);
 }