Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os 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>

Al Viro 44907d79 b452a458

+13 -21
+1 -2
fs/9p/vfs_inode.c
··· 859 859 860 860 static int 861 861 v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, 862 - struct file *file, unsigned flags, umode_t mode, 863 - int *opened) 862 + struct file *file, unsigned flags, umode_t mode) 864 863 { 865 864 int err; 866 865 u32 perm;
+1 -2
fs/9p/vfs_inode_dotl.c
··· 241 241 242 242 static int 243 243 v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry, 244 - struct file *file, unsigned flags, umode_t omode, 245 - int *opened) 244 + struct file *file, unsigned flags, umode_t omode) 246 245 { 247 246 int err = 0; 248 247 kgid_t gid;
+1 -1
fs/bad_inode.c
··· 134 134 135 135 static int bad_inode_atomic_open(struct inode *inode, struct dentry *dentry, 136 136 struct file *file, unsigned int open_flag, 137 - umode_t create_mode, int *opened) 137 + umode_t create_mode) 138 138 { 139 139 return -EIO; 140 140 }
+1 -2
fs/ceph/file.c
··· 429 429 * file or symlink, return 1 so the VFS can retry. 430 430 */ 431 431 int ceph_atomic_open(struct inode *dir, struct dentry *dentry, 432 - struct file *file, unsigned flags, umode_t mode, 433 - int *opened) 432 + struct file *file, unsigned flags, umode_t mode) 434 433 { 435 434 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); 436 435 struct ceph_mds_client *mdsc = fsc->mdsc;
+1 -2
fs/ceph/super.h
··· 1025 1025 extern int ceph_renew_caps(struct inode *inode); 1026 1026 extern int ceph_open(struct inode *inode, struct file *file); 1027 1027 extern int ceph_atomic_open(struct inode *dir, struct dentry *dentry, 1028 - struct file *file, unsigned flags, umode_t mode, 1029 - int *opened); 1028 + struct file *file, unsigned flags, umode_t mode); 1030 1029 extern int ceph_release(struct inode *inode, struct file *filp); 1031 1030 extern void ceph_fill_inline_data(struct inode *inode, struct page *locked_page, 1032 1031 char *data, size_t len);
+1 -2
fs/cifs/cifsfs.h
··· 65 65 extern int cifs_create(struct inode *, struct dentry *, umode_t, 66 66 bool excl); 67 67 extern int cifs_atomic_open(struct inode *, struct dentry *, 68 - struct file *, unsigned, umode_t, 69 - int *); 68 + struct file *, unsigned, umode_t); 70 69 extern struct dentry *cifs_lookup(struct inode *, struct dentry *, 71 70 unsigned int); 72 71 extern int cifs_unlink(struct inode *dir, struct dentry *dentry);
+1 -2
fs/cifs/dir.c
··· 465 465 466 466 int 467 467 cifs_atomic_open(struct inode *inode, struct dentry *direntry, 468 - struct file *file, unsigned oflags, umode_t mode, 469 - int *opened) 468 + struct file *file, unsigned oflags, umode_t mode) 470 469 { 471 470 int rc; 472 471 unsigned int xid;
+1 -1
fs/fuse/dir.c
··· 489 489 static int fuse_mknod(struct inode *, struct dentry *, umode_t, dev_t); 490 490 static int fuse_atomic_open(struct inode *dir, struct dentry *entry, 491 491 struct file *file, unsigned flags, 492 - umode_t mode, int *opened) 492 + umode_t mode) 493 493 { 494 494 int err; 495 495 struct fuse_conn *fc = get_fuse_conn(dir);
+1 -2
fs/gfs2/inode.c
··· 1228 1228 * @file: The proposed new struct file 1229 1229 * @flags: open flags 1230 1230 * @mode: File mode 1231 - * @opened: Flag to say whether the file has been opened or not 1232 1231 * 1233 1232 * Returns: error code or 0 for success 1234 1233 */ 1235 1234 1236 1235 static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry, 1237 1236 struct file *file, unsigned flags, 1238 - umode_t mode, int *opened) 1237 + umode_t mode) 1239 1238 { 1240 1239 struct dentry *d; 1241 1240 bool excl = !!(flags & O_EXCL);
+1 -2
fs/namei.c
··· 3052 3052 file->f_path.dentry = DENTRY_NOT_SET; 3053 3053 file->f_path.mnt = nd->path.mnt; 3054 3054 error = dir->i_op->atomic_open(dir, dentry, file, 3055 - open_to_namei_flags(open_flag), 3056 - mode, opened); 3055 + open_to_namei_flags(open_flag), mode); 3057 3056 d_lookup_done(dentry); 3058 3057 if (!error) { 3059 3058 /*
+1 -1
fs/nfs/dir.c
··· 1451 1451 1452 1452 int nfs_atomic_open(struct inode *dir, struct dentry *dentry, 1453 1453 struct file *file, unsigned open_flags, 1454 - umode_t mode, int *opened) 1454 + umode_t mode) 1455 1455 { 1456 1456 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq); 1457 1457 struct nfs_open_context *ctx;
+1 -1
fs/nfs/nfs4_fs.h
··· 258 258 259 259 /* dir.c */ 260 260 int nfs_atomic_open(struct inode *, struct dentry *, struct file *, 261 - unsigned, umode_t, int *); 261 + unsigned, umode_t); 262 262 263 263 /* super.c */ 264 264 extern struct file_system_type nfs4_fs_type;
+1 -1
include/linux/fs.h
··· 1781 1781 int (*update_time)(struct inode *, struct timespec64 *, int); 1782 1782 int (*atomic_open)(struct inode *, struct dentry *, 1783 1783 struct file *, unsigned open_flag, 1784 - umode_t create_mode, int *opened); 1784 + umode_t create_mode); 1785 1785 int (*tmpfile) (struct inode *, struct dentry *, umode_t); 1786 1786 int (*set_acl)(struct inode *, struct posix_acl *, int); 1787 1787 } ____cacheline_aligned;