You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
kill struct opendata
Just pass struct file *. Methods are happier that way... There's no need to return struct file * from finish_open() now, so let it return int. Next: saner prototypes for parts in namei.c Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
+6
-9
@@ -370,7 +370,7 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry,
|
||||
* 'mknod' + 'open' requests.
|
||||
*/
|
||||
static int fuse_create_open(struct inode *dir, struct dentry *entry,
|
||||
struct opendata *od, unsigned flags,
|
||||
struct file *file, unsigned flags,
|
||||
umode_t mode, int *opened)
|
||||
{
|
||||
int err;
|
||||
@@ -382,7 +382,6 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry,
|
||||
struct fuse_open_out outopen;
|
||||
struct fuse_entry_out outentry;
|
||||
struct fuse_file *ff;
|
||||
struct file *file;
|
||||
|
||||
forget = fuse_alloc_forget();
|
||||
err = -ENOMEM;
|
||||
@@ -450,14 +449,12 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry,
|
||||
d_instantiate(entry, inode);
|
||||
fuse_change_entry_timeout(entry, &outentry);
|
||||
fuse_invalidate_attr(dir);
|
||||
file = finish_open(od, entry, generic_file_open, opened);
|
||||
if (IS_ERR(file)) {
|
||||
err = PTR_ERR(file);
|
||||
err = finish_open(file, entry, generic_file_open, opened);
|
||||
if (err) {
|
||||
fuse_sync_release(ff, flags);
|
||||
} else {
|
||||
file->private_data = fuse_file_get(ff);
|
||||
fuse_finish_open(inode, file);
|
||||
err = 0;
|
||||
}
|
||||
return err;
|
||||
|
||||
@@ -473,7 +470,7 @@ out_err:
|
||||
|
||||
static int fuse_mknod(struct inode *, struct dentry *, umode_t, dev_t);
|
||||
static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
|
||||
struct opendata *od, unsigned flags,
|
||||
struct file *file, unsigned flags,
|
||||
umode_t mode, int *opened)
|
||||
{
|
||||
int err;
|
||||
@@ -498,7 +495,7 @@ static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
|
||||
if (fc->no_create)
|
||||
goto mknod;
|
||||
|
||||
err = fuse_create_open(dir, entry, od, flags, mode, opened);
|
||||
err = fuse_create_open(dir, entry, file, flags, mode, opened);
|
||||
if (err == -ENOSYS) {
|
||||
fc->no_create = 1;
|
||||
goto mknod;
|
||||
@@ -512,7 +509,7 @@ mknod:
|
||||
if (err)
|
||||
goto out_dput;
|
||||
no_open:
|
||||
finish_no_open(od, res);
|
||||
finish_no_open(file, res);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user