forked from Minki/linux
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
|
||||
v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||
struct file *file, unsigned flags, umode_t mode,
|
||||
int *opened)
|
||||
struct file *file, unsigned flags, umode_t mode)
|
||||
{
|
||||
int err;
|
||||
u32 perm;
|
||||
|
@ -241,8 +241,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
|
||||
|
||||
static int
|
||||
v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
|
||||
struct file *file, unsigned flags, umode_t omode,
|
||||
int *opened)
|
||||
struct file *file, unsigned flags, umode_t omode)
|
||||
{
|
||||
int err = 0;
|
||||
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,
|
||||
struct file *file, unsigned int open_flag,
|
||||
umode_t create_mode, int *opened)
|
||||
umode_t create_mode)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -429,8 +429,7 @@ out:
|
||||
* file or symlink, return 1 so the VFS can retry.
|
||||
*/
|
||||
int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||
struct file *file, unsigned flags, umode_t mode,
|
||||
int *opened)
|
||||
struct file *file, unsigned flags, umode_t mode)
|
||||
{
|
||||
struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb);
|
||||
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_open(struct inode *inode, struct file *file);
|
||||
extern int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||
struct file *file, unsigned flags, umode_t mode,
|
||||
int *opened);
|
||||
struct file *file, unsigned flags, umode_t mode);
|
||||
extern int ceph_release(struct inode *inode, struct file *filp);
|
||||
extern void ceph_fill_inline_data(struct inode *inode, struct page *locked_page,
|
||||
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,
|
||||
bool excl);
|
||||
extern int cifs_atomic_open(struct inode *, struct dentry *,
|
||||
struct file *, unsigned, umode_t,
|
||||
int *);
|
||||
struct file *, unsigned, umode_t);
|
||||
extern struct dentry *cifs_lookup(struct inode *, struct dentry *,
|
||||
unsigned int);
|
||||
extern int cifs_unlink(struct inode *dir, struct dentry *dentry);
|
||||
|
@ -465,8 +465,7 @@ out_err:
|
||||
|
||||
int
|
||||
cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||
struct file *file, unsigned oflags, umode_t mode,
|
||||
int *opened)
|
||||
struct file *file, unsigned oflags, umode_t mode)
|
||||
{
|
||||
int rc;
|
||||
unsigned int xid;
|
||||
|
@ -489,7 +489,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 file *file, unsigned flags,
|
||||
umode_t mode, int *opened)
|
||||
umode_t mode)
|
||||
{
|
||||
int err;
|
||||
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
|
||||
* @flags: open flags
|
||||
* @mode: File mode
|
||||
* @opened: Flag to say whether the file has been opened or not
|
||||
*
|
||||
* Returns: error code or 0 for success
|
||||
*/
|
||||
|
||||
static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||
struct file *file, unsigned flags,
|
||||
umode_t mode, int *opened)
|
||||
umode_t mode)
|
||||
{
|
||||
struct dentry *d;
|
||||
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.mnt = nd->path.mnt;
|
||||
error = dir->i_op->atomic_open(dir, dentry, file,
|
||||
open_to_namei_flags(open_flag),
|
||||
mode, opened);
|
||||
open_to_namei_flags(open_flag), mode);
|
||||
d_lookup_done(dentry);
|
||||
if (!error) {
|
||||
/*
|
||||
|
@ -1451,7 +1451,7 @@ out:
|
||||
|
||||
int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||
struct file *file, unsigned open_flags,
|
||||
umode_t mode, int *opened)
|
||||
umode_t mode)
|
||||
{
|
||||
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
|
||||
struct nfs_open_context *ctx;
|
||||
|
@ -258,7 +258,7 @@ extern const struct dentry_operations nfs4_dentry_operations;
|
||||
|
||||
/* dir.c */
|
||||
int nfs_atomic_open(struct inode *, struct dentry *, struct file *,
|
||||
unsigned, umode_t, int *);
|
||||
unsigned, umode_t);
|
||||
|
||||
/* super.c */
|
||||
extern struct file_system_type nfs4_fs_type;
|
||||
|
@ -1781,7 +1781,7 @@ struct inode_operations {
|
||||
int (*update_time)(struct inode *, struct timespec64 *, int);
|
||||
int (*atomic_open)(struct inode *, struct dentry *,
|
||||
struct file *, unsigned open_flag,
|
||||
umode_t create_mode, int *opened);
|
||||
umode_t create_mode);
|
||||
int (*tmpfile) (struct inode *, struct dentry *, umode_t);
|
||||
int (*set_acl)(struct inode *, struct posix_acl *, int);
|
||||
} ____cacheline_aligned;
|
||||
|
Loading…
Reference in New Issue
Block a user