get rid of 'opened' argument of ->atomic_open() - part 3
now it can be done... Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
b452a458ca
commit
44907d7900
@ -859,8 +859,7 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||||
struct file *file, unsigned flags, umode_t mode,
|
struct file *file, unsigned flags, umode_t mode)
|
||||||
int *opened)
|
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
u32 perm;
|
u32 perm;
|
||||||
|
@ -241,8 +241,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
|
v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
|
||||||
struct file *file, unsigned flags, umode_t omode,
|
struct file *file, unsigned flags, umode_t omode)
|
||||||
int *opened)
|
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
kgid_t gid;
|
kgid_t gid;
|
||||||
|
@ -134,7 +134,7 @@ static int bad_inode_update_time(struct inode *inode, struct timespec64 *time,
|
|||||||
|
|
||||||
static int bad_inode_atomic_open(struct inode *inode, struct dentry *dentry,
|
static int bad_inode_atomic_open(struct inode *inode, struct dentry *dentry,
|
||||||
struct file *file, unsigned int open_flag,
|
struct file *file, unsigned int open_flag,
|
||||||
umode_t create_mode, int *opened)
|
umode_t create_mode)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
@ -429,8 +429,7 @@ out:
|
|||||||
* file or symlink, return 1 so the VFS can retry.
|
* file or symlink, return 1 so the VFS can retry.
|
||||||
*/
|
*/
|
||||||
int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
|
int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||||
struct file *file, unsigned flags, umode_t mode,
|
struct file *file, unsigned flags, umode_t mode)
|
||||||
int *opened)
|
|
||||||
{
|
{
|
||||||
struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb);
|
struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb);
|
||||||
struct ceph_mds_client *mdsc = fsc->mdsc;
|
struct ceph_mds_client *mdsc = fsc->mdsc;
|
||||||
|
@ -1025,8 +1025,7 @@ extern const struct file_operations ceph_file_fops;
|
|||||||
extern int ceph_renew_caps(struct inode *inode);
|
extern int ceph_renew_caps(struct inode *inode);
|
||||||
extern int ceph_open(struct inode *inode, struct file *file);
|
extern int ceph_open(struct inode *inode, struct file *file);
|
||||||
extern int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
|
extern int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||||
struct file *file, unsigned flags, umode_t mode,
|
struct file *file, unsigned flags, umode_t mode);
|
||||||
int *opened);
|
|
||||||
extern int ceph_release(struct inode *inode, struct file *filp);
|
extern int ceph_release(struct inode *inode, struct file *filp);
|
||||||
extern void ceph_fill_inline_data(struct inode *inode, struct page *locked_page,
|
extern void ceph_fill_inline_data(struct inode *inode, struct page *locked_page,
|
||||||
char *data, size_t len);
|
char *data, size_t len);
|
||||||
|
@ -65,8 +65,7 @@ extern struct inode *cifs_root_iget(struct super_block *);
|
|||||||
extern int cifs_create(struct inode *, struct dentry *, umode_t,
|
extern int cifs_create(struct inode *, struct dentry *, umode_t,
|
||||||
bool excl);
|
bool excl);
|
||||||
extern int cifs_atomic_open(struct inode *, struct dentry *,
|
extern int cifs_atomic_open(struct inode *, struct dentry *,
|
||||||
struct file *, unsigned, umode_t,
|
struct file *, unsigned, umode_t);
|
||||||
int *);
|
|
||||||
extern struct dentry *cifs_lookup(struct inode *, struct dentry *,
|
extern struct dentry *cifs_lookup(struct inode *, struct dentry *,
|
||||||
unsigned int);
|
unsigned int);
|
||||||
extern int cifs_unlink(struct inode *dir, struct dentry *dentry);
|
extern int cifs_unlink(struct inode *dir, struct dentry *dentry);
|
||||||
|
@ -465,8 +465,7 @@ out_err:
|
|||||||
|
|
||||||
int
|
int
|
||||||
cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||||
struct file *file, unsigned oflags, umode_t mode,
|
struct file *file, unsigned oflags, umode_t mode)
|
||||||
int *opened)
|
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
unsigned int xid;
|
unsigned int xid;
|
||||||
|
@ -489,7 +489,7 @@ out_err:
|
|||||||
static int fuse_mknod(struct inode *, struct dentry *, umode_t, dev_t);
|
static int fuse_mknod(struct inode *, struct dentry *, umode_t, dev_t);
|
||||||
static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
|
static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
|
||||||
struct file *file, unsigned flags,
|
struct file *file, unsigned flags,
|
||||||
umode_t mode, int *opened)
|
umode_t mode)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct fuse_conn *fc = get_fuse_conn(dir);
|
struct fuse_conn *fc = get_fuse_conn(dir);
|
||||||
|
@ -1228,14 +1228,13 @@ static int gfs2_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
|
|||||||
* @file: The proposed new struct file
|
* @file: The proposed new struct file
|
||||||
* @flags: open flags
|
* @flags: open flags
|
||||||
* @mode: File mode
|
* @mode: File mode
|
||||||
* @opened: Flag to say whether the file has been opened or not
|
|
||||||
*
|
*
|
||||||
* Returns: error code or 0 for success
|
* Returns: error code or 0 for success
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
|
static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||||
struct file *file, unsigned flags,
|
struct file *file, unsigned flags,
|
||||||
umode_t mode, int *opened)
|
umode_t mode)
|
||||||
{
|
{
|
||||||
struct dentry *d;
|
struct dentry *d;
|
||||||
bool excl = !!(flags & O_EXCL);
|
bool excl = !!(flags & O_EXCL);
|
||||||
|
@ -3052,8 +3052,7 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
|
|||||||
file->f_path.dentry = DENTRY_NOT_SET;
|
file->f_path.dentry = DENTRY_NOT_SET;
|
||||||
file->f_path.mnt = nd->path.mnt;
|
file->f_path.mnt = nd->path.mnt;
|
||||||
error = dir->i_op->atomic_open(dir, dentry, file,
|
error = dir->i_op->atomic_open(dir, dentry, file,
|
||||||
open_to_namei_flags(open_flag),
|
open_to_namei_flags(open_flag), mode);
|
||||||
mode, opened);
|
|
||||||
d_lookup_done(dentry);
|
d_lookup_done(dentry);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
/*
|
/*
|
||||||
|
@ -1451,7 +1451,7 @@ out:
|
|||||||
|
|
||||||
int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||||
struct file *file, unsigned open_flags,
|
struct file *file, unsigned open_flags,
|
||||||
umode_t mode, int *opened)
|
umode_t mode)
|
||||||
{
|
{
|
||||||
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
|
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
|
||||||
struct nfs_open_context *ctx;
|
struct nfs_open_context *ctx;
|
||||||
|
@ -258,7 +258,7 @@ extern const struct dentry_operations nfs4_dentry_operations;
|
|||||||
|
|
||||||
/* dir.c */
|
/* dir.c */
|
||||||
int nfs_atomic_open(struct inode *, struct dentry *, struct file *,
|
int nfs_atomic_open(struct inode *, struct dentry *, struct file *,
|
||||||
unsigned, umode_t, int *);
|
unsigned, umode_t);
|
||||||
|
|
||||||
/* super.c */
|
/* super.c */
|
||||||
extern struct file_system_type nfs4_fs_type;
|
extern struct file_system_type nfs4_fs_type;
|
||||||
|
@ -1781,7 +1781,7 @@ struct inode_operations {
|
|||||||
int (*update_time)(struct inode *, struct timespec64 *, int);
|
int (*update_time)(struct inode *, struct timespec64 *, int);
|
||||||
int (*atomic_open)(struct inode *, struct dentry *,
|
int (*atomic_open)(struct inode *, struct dentry *,
|
||||||
struct file *, unsigned open_flag,
|
struct file *, unsigned open_flag,
|
||||||
umode_t create_mode, int *opened);
|
umode_t create_mode);
|
||||||
int (*tmpfile) (struct inode *, struct dentry *, umode_t);
|
int (*tmpfile) (struct inode *, struct dentry *, umode_t);
|
||||||
int (*set_acl)(struct inode *, struct posix_acl *, int);
|
int (*set_acl)(struct inode *, struct posix_acl *, int);
|
||||||
} ____cacheline_aligned;
|
} ____cacheline_aligned;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user