static int fuse_create(struct inode *dir, struct dentry *entry, int mode, struct nameidata *nd) { if (nd && (nd->flags & LOOKUP_OPEN)) { int err = fuse_create_open(dir, entry, mode, nd); if (err != -ENOSYS) return err; /* Fall back on mknod */ } return fuse_mknod(dir, entry, mode, 0); }
static int fuse_create(struct inode *dir, struct dentry *entry, umode_t mode, struct nameidata *nd) { if (nd) { int err = fuse_create_open(dir, entry, mode, nd); if (err != -ENOSYS) return err; } return fuse_mknod(dir, entry, mode, 0); }
static int fuse_create(struct inode *dir, struct dentry *entry, int mode, struct nameidata *nd) { #ifdef HAVE_LOOKUP_INSTANTIATE_FILP if (nd && (nd->flags & LOOKUP_CREATE)) { int err = fuse_create_open(dir, entry, mode, nd); if (err != -ENOSYS) return err; /* Fall back on mknod */ } #endif return fuse_mknod(dir, entry, mode, 0); }
static int fuse_atomic_open(struct inode *dir, struct dentry *entry, struct file *file, unsigned flags, umode_t mode, int *opened) { int err; struct fuse_conn *fc = get_fuse_conn(dir); struct dentry *res = NULL; if (d_unhashed(entry)) { res = fuse_lookup(dir, entry, 0); if (IS_ERR(res)) return PTR_ERR(res); if (res) entry = res; } if (!(flags & O_CREAT) || entry->d_inode) goto no_open; /* Only creates */ *opened |= FILE_CREATED; if (fc->no_create) goto mknod; err = fuse_create_open(dir, entry, file, flags, mode, opened); if (err == -ENOSYS) { fc->no_create = 1; goto mknod; } out_dput: dput(res); return err; mknod: err = fuse_mknod(dir, entry, mode, 0); if (err) goto out_dput; no_open: return finish_no_open(file, res); }
static int fuse_create(struct inode *dir, struct dentry *entry, umode_t mode, bool excl) { return fuse_mknod(dir, entry, mode, 0); }
static int fuse_mknod_2_4(struct inode *dir, struct dentry *entry, int mode, int rdev) { return fuse_mknod(dir, entry, mode, rdev); }