Merge tag 'for-linus-v3.6-rc4' of git://oss.sgi.com/xfs/xfs
[firefly-linux-kernel-4.4.55.git] / fs / fuse / dir.c
index 8964cf3999b2bb561ec71d93914170529f72977a..324bc085053447665eccaacdc8fcf169cb418413 100644 (file)
@@ -383,6 +383,9 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry,
        struct fuse_entry_out outentry;
        struct fuse_file *ff;
 
+       /* Userspace expects S_IFREG in create mode */
+       BUG_ON((mode & S_IFMT) != S_IFREG);
+
        forget = fuse_alloc_forget();
        err = -ENOMEM;
        if (!forget)