mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 06:20:53 +07:00
make finish_no_open() return int
namely, 1 ;-) That's what we want to return from ->atomic_open() instances after finish_no_open(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
2675a4eb6a
commit
e45198a6ac
@ -878,10 +878,8 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Only creates */
|
/* Only creates */
|
||||||
if (!(flags & O_CREAT) || dentry->d_inode) {
|
if (!(flags & O_CREAT) || dentry->d_inode)
|
||||||
finish_no_open(file, res);
|
return finish_no_open(file, res);
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = 0;
|
err = 0;
|
||||||
fid = NULL;
|
fid = NULL;
|
||||||
|
@ -268,10 +268,8 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Only creates */
|
/* Only creates */
|
||||||
if (!(flags & O_CREAT) || dentry->d_inode) {
|
if (!(flags & O_CREAT) || dentry->d_inode)
|
||||||
finish_no_open(file, res);
|
return finish_no_open(file, res);
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
v9ses = v9fs_inode2v9ses(dir);
|
v9ses = v9fs_inode2v9ses(dir);
|
||||||
|
|
||||||
|
@ -662,10 +662,8 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* We don't deal with positive dentries here */
|
/* We don't deal with positive dentries here */
|
||||||
if (dentry->d_inode) {
|
if (dentry->d_inode)
|
||||||
finish_no_open(file, res);
|
return finish_no_open(file, res);
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
*opened |= FILE_CREATED;
|
*opened |= FILE_CREATED;
|
||||||
err = ceph_lookup_open(dir, dentry, file, flags, mode, opened);
|
err = ceph_lookup_open(dir, dentry, file, flags, mode, opened);
|
||||||
|
@ -405,8 +405,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
|||||||
if (IS_ERR(res))
|
if (IS_ERR(res))
|
||||||
return PTR_ERR(res);
|
return PTR_ERR(res);
|
||||||
|
|
||||||
finish_no_open(file, res);
|
return finish_no_open(file, res);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = check_name(direntry);
|
rc = check_name(direntry);
|
||||||
|
@ -509,8 +509,7 @@ static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
|
|||||||
if (err)
|
if (err)
|
||||||
goto out_dput;
|
goto out_dput;
|
||||||
no_open:
|
no_open:
|
||||||
finish_no_open(file, res);
|
return finish_no_open(file, res);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1505,8 +1505,7 @@ static int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
|||||||
if (IS_ERR(res))
|
if (IS_ERR(res))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
finish_no_open(file, res);
|
return finish_no_open(file, res);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nfs4_lookup_revalidate(struct dentry *dentry, struct nameidata *nd)
|
static int nfs4_lookup_revalidate(struct dentry *dentry, struct nameidata *nd)
|
||||||
|
@ -810,9 +810,10 @@ EXPORT_SYMBOL(finish_open);
|
|||||||
* This can be used to set the result of a successful lookup in ->atomic_open().
|
* This can be used to set the result of a successful lookup in ->atomic_open().
|
||||||
* The filesystem's atomic_open() method shall return NULL after calling this.
|
* The filesystem's atomic_open() method shall return NULL after calling this.
|
||||||
*/
|
*/
|
||||||
void finish_no_open(struct file *file, struct dentry *dentry)
|
int finish_no_open(struct file *file, struct dentry *dentry)
|
||||||
{
|
{
|
||||||
file->f_path.dentry = dentry;
|
file->f_path.dentry = dentry;
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(finish_no_open);
|
EXPORT_SYMBOL(finish_no_open);
|
||||||
|
|
||||||
|
@ -2071,7 +2071,7 @@ enum {
|
|||||||
extern int finish_open(struct file *file, struct dentry *dentry,
|
extern int finish_open(struct file *file, struct dentry *dentry,
|
||||||
int (*open)(struct inode *, struct file *),
|
int (*open)(struct inode *, struct file *),
|
||||||
int *opened);
|
int *opened);
|
||||||
extern void finish_no_open(struct file *file, struct dentry *dentry);
|
extern int finish_no_open(struct file *file, struct dentry *dentry);
|
||||||
|
|
||||||
/* fs/ioctl.c */
|
/* fs/ioctl.c */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user