]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
don't pass nameidata to ->create()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 10 Jun 2012 22:05:36 +0000 (18:05 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 14 Jul 2012 12:34:47 +0000 (16:34 +0400)
boolean "does it have to be exclusive?" flag is passed instead;
Local filesystem should just ignore it - the object is guaranteed
not to be there yet.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
51 files changed:
Documentation/filesystems/Locking
Documentation/filesystems/porting
Documentation/filesystems/vfs.txt
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c
fs/affs/affs.h
fs/affs/namei.c
fs/afs/dir.c
fs/bad_inode.c
fs/bfs/dir.c
fs/btrfs/inode.c
fs/ceph/dir.c
fs/cifs/cifsfs.h
fs/cifs/dir.c
fs/coda/dir.c
fs/ecryptfs/inode.c
fs/exofs/namei.c
fs/ext2/namei.c
fs/ext3/namei.c
fs/ext4/namei.c
fs/fat/namei_msdos.c
fs/fat/namei_vfat.c
fs/fuse/dir.c
fs/gfs2/inode.c
fs/hfs/dir.c
fs/hfsplus/dir.c
fs/hostfs/hostfs_kern.c
fs/hpfs/namei.c
fs/hugetlbfs/inode.c
fs/jffs2/dir.c
fs/jfs/namei.c
fs/logfs/dir.c
fs/minix/namei.c
fs/namei.c
fs/ncpfs/dir.c
fs/nfs/dir.c
fs/nilfs2/namei.c
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/namei.c
fs/omfs/dir.c
fs/ramfs/inode.c
fs/reiserfs/namei.c
fs/reiserfs/xattr.c
fs/sysv/namei.c
fs/ubifs/dir.c
fs/udf/namei.c
fs/ufs/namei.c
fs/xfs/xfs_iops.c
include/linux/fs.h
ipc/mqueue.c
mm/shmem.c

index 33f2c8f1db814691cc7ee41bbbaab68dd42a523e..e0cce2a5f820a6327f9ea1558717434c490e8aae 100644 (file)
@@ -37,7 +37,7 @@ d_manage:     no              no              yes (ref-walk)  maybe
 
 --------------------------- inode_operations --------------------------- 
 prototypes:
-       int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *);
+       int (*create) (struct inode *,struct dentry *,umode_t, bool);
        struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
        int (*link) (struct dentry *,struct inode *,struct dentry *);
        int (*unlink) (struct inode *,struct dentry *);
index 690f573928b998426755ef735bd96bc69fc2cab9..2bef2b3843d1d4e09ead99fed121de4b2ab92db2 100644 (file)
@@ -436,3 +436,9 @@ d_make_root() drops the reference to inode if dentry allocation fails.
 [mandatory]
        The witch is dead!  Well, 2/3 of it, anyway.  ->d_revalidate() and
 ->lookup() do *not* take struct nameidata anymore; just the flags.
+--
+[mandatory]
+       ->create() doesn't take struct nameidata *; unlike the previous
+two, it gets "is it an O_EXCL or equivalent?" boolean argument.  Note that
+local filesystems can ignore tha argument - they are guaranteed that the
+object doesn't exist.  It's remote/distributed ones that might care...
index ee786354946cc8d1e3f0d31f3b9613fff98d088b..aa754e01464e1c71f55869da9d5222ef763518d7 100644 (file)
@@ -341,7 +341,7 @@ This describes how the VFS can manipulate an inode in your
 filesystem. As of kernel 2.6.22, the following members are defined:
 
 struct inode_operations {
-       int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *);
+       int (*create) (struct inode *,struct dentry *, umode_t, bool);
        struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
        int (*link) (struct dentry *,struct inode *,struct dentry *);
        int (*unlink) (struct inode *,struct dentry *);
index bb0d7627f95bee51710a3e26227a141b99dacb6c..cbf9dbb1b2a270f4ebd911f7b1aca3d0107969e3 100644 (file)
@@ -725,7 +725,7 @@ error:
 
 static int
 v9fs_vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-               struct nameidata *nd)
+               bool excl)
 {
        struct v9fs_session_info *v9ses = v9fs_inode2v9ses(dir);
        u32 perm = unixmode2p9mode(v9ses, mode);
index b97619fed19688e16694aa291501ae3431561fda..40895546e103e3e9b35e9542e23ac929d74de348 100644 (file)
@@ -235,7 +235,7 @@ int v9fs_open_to_dotl_flags(int flags)
 
 static int
 v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
-               struct nameidata *nd)
+               bool excl)
 {
        return v9fs_vfs_mknod_dotl(dir, dentry, omode, 0);
 }
index 49e4e3457bfd11561f284e85ec65635a135493a7..6e216419f340de5219a684db6a70f99643784ac5 100644 (file)
@@ -155,7 +155,7 @@ extern void affs_free_bitmap(struct super_block *sb);
 extern int     affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len);
 extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int);
 extern int     affs_unlink(struct inode *dir, struct dentry *dentry);
-extern int     affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *);
+extern int     affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool);
 extern int     affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
 extern int     affs_rmdir(struct inode *dir, struct dentry *dentry);
 extern int     affs_link(struct dentry *olddentry, struct inode *dir,
index 7f9721be709fbd4b22bb45cd6ff3f96e4fa9a132..ff65884a7839974ca472a64097ac996245c96346 100644 (file)
@@ -255,7 +255,7 @@ affs_unlink(struct inode *dir, struct dentry *dentry)
 }
 
 int
-affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd)
+affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
 {
        struct super_block *sb = dir->i_sb;
        struct inode    *inode;
index ffb33e36ea7244ebbcc79e4e2e3710129108178f..db477906ba4f441acd9fc100be2668e7894a7c88 100644 (file)
@@ -29,7 +29,7 @@ static void afs_d_release(struct dentry *dentry);
 static int afs_lookup_filldir(void *_cookie, const char *name, int nlen,
                                  loff_t fpos, u64 ino, unsigned dtype);
 static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                     struct nameidata *nd);
+                     bool excl);
 static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
 static int afs_rmdir(struct inode *dir, struct dentry *dentry);
 static int afs_unlink(struct inode *dir, struct dentry *dentry);
@@ -949,7 +949,7 @@ error:
  * create a regular file on an AFS filesystem
  */
 static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                     struct nameidata *nd)
+                     bool excl)
 {
        struct afs_file_status status;
        struct afs_callback cb;
index d27e73c69ba4cc63b463a69df705fe3b5d059956..b1342ffb3cf6e595125252ac82d5bd54ebbe9544 100644 (file)
@@ -173,7 +173,7 @@ static const struct file_operations bad_file_ops =
 };
 
 static int bad_inode_create (struct inode *dir, struct dentry *dentry,
-               umode_t mode, struct nameidata *nd)
+               umode_t mode, bool excl)
 {
        return -EIO;
 }
index 3f1cd3b71681b2ebb876f8f37ffb390a9cacb7f0..2785ef91191ad07c76bbec51a742e0a43fee8be6 100644 (file)
@@ -85,7 +85,7 @@ const struct file_operations bfs_dir_operations = {
 extern void dump_imap(const char *, struct super_block *);
 
 static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                                               struct nameidata *nd)
+                                               bool excl)
 {
        int err;
        struct inode *inode;
index e5f1f81b2d65c25c217285f77dbce10e993fe50c..fb8d671d00e6b8c7d8b387d4f158f8ab46d362f1 100644 (file)
@@ -4893,7 +4893,7 @@ out_unlock:
 }
 
 static int btrfs_create(struct inode *dir, struct dentry *dentry,
-                       umode_t mode, struct nameidata *nd)
+                       umode_t mode, bool excl)
 {
        struct btrfs_trans_handle *trans;
        struct btrfs_root *root = BTRFS_I(dir)->root;
index 74b2f3c54fe79c2aaf433b4ac7810cbb03ea61fa..00894ff9246c2175b60177bab59b70456733ff01 100644 (file)
@@ -730,7 +730,7 @@ static int ceph_mknod(struct inode *dir, struct dentry *dentry,
 }
 
 static int ceph_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                      struct nameidata *nd)
+                      bool excl)
 {
        return ceph_mknod(dir, dentry, mode, 0);
 }
index 1abd31fd5bf0066c44db92aba8c866d2804ef6c1..1c49c5a9b27a6cd5b188425dfdd3fd934687a003 100644 (file)
@@ -45,7 +45,7 @@ extern const struct address_space_operations cifs_addr_ops_smallbuf;
 extern const struct inode_operations cifs_dir_inode_ops;
 extern struct inode *cifs_root_iget(struct super_block *);
 extern int cifs_create(struct inode *, struct dentry *, umode_t,
-                      struct nameidata *);
+                      bool excl);
 extern int cifs_atomic_open(struct inode *, struct dentry *,
                            struct file *, unsigned, umode_t,
                            int *);
index 2d732b9276eedea41236c4d60aaf0e75a109e994..a180265a10b56b5d4e98c63ff64e298f8146431f 100644 (file)
@@ -451,7 +451,7 @@ free_xid:
 }
 
 int cifs_create(struct inode *inode, struct dentry *direntry, umode_t mode,
-               struct nameidata *nd)
+               bool excl)
 {
        int rc;
        int xid = GetXid();
index da35e965861db1d048c3d55dbfb1308ae1a8c9c8..49fe52d256009729ae9c9ec5cfd1b684255219f3 100644 (file)
@@ -30,7 +30,7 @@
 #include "coda_int.h"
 
 /* dir inode-ops */
-static int coda_create(struct inode *dir, struct dentry *new, umode_t mode, struct nameidata *nd);
+static int coda_create(struct inode *dir, struct dentry *new, umode_t mode, bool excl);
 static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, unsigned int flags);
 static int coda_link(struct dentry *old_dentry, struct inode *dir_inode, 
                     struct dentry *entry);
@@ -188,7 +188,7 @@ static inline void coda_dir_drop_nlink(struct inode *dir)
 }
 
 /* creation routines: create, mknod, mkdir, link, symlink */
-static int coda_create(struct inode *dir, struct dentry *de, umode_t mode, struct nameidata *nd)
+static int coda_create(struct inode *dir, struct dentry *de, umode_t mode, bool excl)
 {
        int error;
        const char *name=de->d_name.name;
index 4ab50c3f5ab26b2c26dcc350e72cb15e022e664f..f079dafea75af0c09c992415ccd8a96cf3d55579 100644 (file)
@@ -240,7 +240,6 @@ out:
  * @dir: The inode of the directory in which to create the file.
  * @dentry: The eCryptfs dentry
  * @mode: The mode of the new file.
- * @nd: nameidata
  *
  * Creates a new file.
  *
@@ -248,7 +247,7 @@ out:
  */
 static int
 ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry,
-               umode_t mode, struct nameidata *nd)
+               umode_t mode, bool excl)
 {
        struct inode *ecryptfs_inode;
        int rc;
index 909ed6ea4cf63c95548d08ab5cdb142aa1653343..4731fd991efee11b2c05e7c45306134e07b3fe82 100644 (file)
@@ -60,7 +60,7 @@ static struct dentry *exofs_lookup(struct inode *dir, struct dentry *dentry,
 }
 
 static int exofs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                        struct nameidata *nd)
+                        bool excl)
 {
        struct inode *inode = exofs_new_inode(dir, mode);
        int err = PTR_ERR(inode);
index b3e6778cd1e70aaa3d7feec43075a31d0181fe42..9ba7de0e5903c6e7d50a7591905433ae34c34dfa 100644 (file)
@@ -94,7 +94,7 @@ struct dentry *ext2_get_parent(struct dentry *child)
  * If the create succeeds, we fill in the inode information
  * with d_instantiate(). 
  */
-static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd)
+static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, bool excl)
 {
        struct inode *inode;
 
index 86d25f3f6043658b8bf123fa1c3e71df87fc4f62..85286dbe27535863b3d95dacc77b9034e8f6affd 100644 (file)
@@ -1690,7 +1690,7 @@ static int ext3_add_nondir(handle_t *handle,
  * with d_instantiate().
  */
 static int ext3_create (struct inode * dir, struct dentry * dentry, umode_t mode,
-               struct nameidata *nd)
+               bool excl)
 {
        handle_t *handle;
        struct inode * inode;
index 4fba3cd42e2b6553ea515cab9dd1f2718383fec8..eca3e48a62f81bc3718dee39075e9958fa358e30 100644 (file)
@@ -2091,7 +2091,7 @@ static int ext4_add_nondir(handle_t *handle,
  * with d_instantiate().
  */
 static int ext4_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                      struct nameidata *nd)
+                      bool excl)
 {
        handle_t *handle;
        struct inode *inode;
index 47c608b0529409d872599fb53f776c4ec6b488a2..70d993a9380572bac393a45f3dcb9896db404f9e 100644 (file)
@@ -265,7 +265,7 @@ static int msdos_add_entry(struct inode *dir, const unsigned char *name,
 
 /***** Create a file */
 static int msdos_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                       struct nameidata *nd)
+                       bool excl)
 {
        struct super_block *sb = dir->i_sb;
        struct inode *inode = NULL;
index 44152571524e13fab69a08f5cb8de114f622c68c..6cc480652433b66a52c42cbcd3bde3f19e348f30 100644 (file)
@@ -772,7 +772,7 @@ error:
 }
 
 static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                      struct nameidata *nd)
+                      bool excl)
 {
        struct super_block *sb = dir->i_sb;
        struct inode *inode;
index 385235ac137d4b80d355855ae22facfb1865c864..8964cf3999b2bb561ec71d93914170529f72977a 100644 (file)
@@ -611,7 +611,7 @@ static int fuse_mknod(struct inode *dir, struct dentry *entry, umode_t mode,
 }
 
 static int fuse_create(struct inode *dir, struct dentry *entry, umode_t mode,
-                      struct nameidata *nd)
+                      bool excl)
 {
        return fuse_mknod(dir, entry, mode, 0);
 }
index 19e443b733542c840b74e485f9912cafc14b6aed..867674785fcf04909ae03cd5d6f95752fcaeee6d 100644 (file)
@@ -755,11 +755,8 @@ fail:
  */
 
 static int gfs2_create(struct inode *dir, struct dentry *dentry,
-                      umode_t mode, struct nameidata *nd)
+                      umode_t mode, bool excl)
 {
-       int excl = 0;
-       if (nd && (nd->flags & LOOKUP_EXCL))
-               excl = 1;
        return gfs2_create_inode(dir, dentry, S_IFREG | mode, 0, NULL, 0, excl);
 }
 
index 617b1ed71f52b1b568d0884f128a512465618176..422dde2ec0a1ecc99f5d129136e044e5ee0a1f1b 100644 (file)
@@ -187,7 +187,7 @@ static int hfs_dir_release(struct inode *inode, struct file *file)
  * the directory and the name (and its length) of the new file.
  */
 static int hfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                     struct nameidata *nd)
+                     bool excl)
 {
        struct inode *inode;
        int res;
index 90c2f78b2c7958ec7ba8ba60cc371701307df5d5..378ea0c43f19e53ee67173c4dd01e975937d4798 100644 (file)
@@ -465,7 +465,7 @@ out:
 }
 
 static int hfsplus_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                         struct nameidata *nd)
+                         bool excl)
 {
        return hfsplus_mknod(dir, dentry, mode, 0);
 }
index 0ea005228e1bd52a9ad8a08290b69a277bcf652b..124146543aa76ec87187955cf237f6a04e441ad4 100644 (file)
@@ -553,7 +553,7 @@ static int read_name(struct inode *ino, char *name)
 }
 
 int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                 struct nameidata *nd)
+                 bool excl)
 {
        struct inode *inode;
        char *name;
index 9083ef8af58c162f7fd207f7ef37263b1f35de4f..bc9082482f6841c21a0bb520d4333fae14efcb9a 100644 (file)
@@ -115,7 +115,7 @@ bail:
        return err;
 }
 
-static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd)
+static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
 {
        const unsigned char *name = dentry->d_name.name;
        unsigned len = dentry->d_name.len;
index cc9281b6c62893a94cedcb36128dcae427861fcd..e13e9bdb0bf57f2cdfe03fc1ad013826e1668d41 100644 (file)
@@ -565,7 +565,7 @@ static int hugetlbfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mod
        return retval;
 }
 
-static int hugetlbfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd)
+static int hugetlbfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
 {
        return hugetlbfs_mknod(dir, dentry, mode | S_IFREG, 0);
 }
index 6a601673f89fe69a0182460963752043ad3b0527..23245191c5b520621f503a1f96783a63655e5d02 100644 (file)
@@ -25,7 +25,7 @@
 static int jffs2_readdir (struct file *, void *, filldir_t);
 
 static int jffs2_create (struct inode *,struct dentry *,umode_t,
-                        struct nameidata *);
+                        bool);
 static struct dentry *jffs2_lookup (struct inode *,struct dentry *,
                                    unsigned int);
 static int jffs2_link (struct dentry *,struct inode *,struct dentry *);
@@ -175,7 +175,7 @@ static int jffs2_readdir(struct file *filp, void *dirent, filldir_t filldir)
 
 
 static int jffs2_create(struct inode *dir_i, struct dentry *dentry,
-                       umode_t mode, struct nameidata *nd)
+                       umode_t mode, bool excl)
 {
        struct jffs2_raw_inode *ri;
        struct jffs2_inode_info *f, *dir_f;
index 34fe85555cafb72e3c0da56afba593accc4ac488..c426293e16c12e62fb40ba142d903b75442e6aed 100644 (file)
@@ -73,7 +73,7 @@ static inline void free_ea_wmap(struct inode *inode)
  *
  */
 static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode,
-               struct nameidata *nd)
+               bool excl)
 {
        int rc = 0;
        tid_t tid;              /* transaction id */
index 8a3dcc615b396df55bcff9d2716fcf34921ebf4a..26e4a941532fb62dc18338a08bd313d9ccb4445b 100644 (file)
@@ -502,7 +502,7 @@ static int logfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 }
 
 static int logfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-               struct nameidata *nd)
+               bool excl)
 {
        struct inode *inode;
 
index 1f245240ea08617a3863cc200b5b720d521fa870..0db73d9dd66845d289f6f1a58e1960ecc1ee3e74 100644 (file)
@@ -55,7 +55,7 @@ static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode,
 }
 
 static int minix_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-               struct nameidata *nd)
+               bool excl)
 {
        return minix_mknod(dir, dentry, mode, 0);
 }
index fc01090a96c1c07ab52c9c52fd98edc1627c36a9..fd71156bfd74d941d81eca58abe9cefff7944973 100644 (file)
@@ -2082,7 +2082,6 @@ int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
                struct nameidata *nd)
 {
        int error = may_create(dir, dentry);
-
        if (error)
                return error;
 
@@ -2093,7 +2092,7 @@ int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
        error = security_inode_create(dir, dentry, mode);
        if (error)
                return error;
-       error = dir->i_op->create(dir, dentry, mode, nd);
+       error = dir->i_op->create(dir, dentry, mode, !nd || (nd->flags & LOOKUP_EXCL));
        if (!error)
                fsnotify_create(dir, dentry);
        return error;
index a0cff22bfc9bf84ad58870c30b5d1ee56659c53b..4117e7b377bbf731a5345ef8b640ad5aa6607837 100644 (file)
@@ -30,7 +30,7 @@ static void ncp_do_readdir(struct file *, void *, filldir_t,
 
 static int ncp_readdir(struct file *, void *, filldir_t);
 
-static int ncp_create(struct inode *, struct dentry *, umode_t, struct nameidata *);
+static int ncp_create(struct inode *, struct dentry *, umode_t, bool);
 static struct dentry *ncp_lookup(struct inode *, struct dentry *, unsigned int);
 static int ncp_unlink(struct inode *, struct dentry *);
 static int ncp_mkdir(struct inode *, struct dentry *, umode_t);
@@ -980,7 +980,7 @@ out:
 }
 
 static int ncp_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-               struct nameidata *nd)
+               bool excl)
 {
        return ncp_create_new(dir, dentry, mode, 0, 0);
 }
index 8f21205c5896531594c1f63efb5997fd15d76842..a6b1c7fb8232c0a3152f79175e2047421c896859 100644 (file)
@@ -47,7 +47,7 @@ static int nfs_opendir(struct inode *, struct file *);
 static int nfs_closedir(struct inode *, struct file *);
 static int nfs_readdir(struct file *, void *, filldir_t);
 static struct dentry *nfs_lookup(struct inode *, struct dentry *, unsigned int);
-static int nfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *);
+static int nfs_create(struct inode *, struct dentry *, umode_t, bool);
 static int nfs_mkdir(struct inode *, struct dentry *, umode_t);
 static int nfs_rmdir(struct inode *, struct dentry *);
 static int nfs_unlink(struct inode *, struct dentry *);
@@ -1589,11 +1589,11 @@ out_error:
  * reply path made it appear to have failed.
  */
 static int nfs_create(struct inode *dir, struct dentry *dentry,
-               umode_t mode, struct nameidata *nd)
+               umode_t mode, bool excl)
 {
        struct iattr attr;
+       int open_flags = excl ? O_CREAT | O_EXCL : O_CREAT;
        int error;
-       int open_flags = O_CREAT|O_EXCL;
 
        dfprintk(VFS, "NFS: create(%s/%ld), %s\n",
                        dir->i_sb->s_id, dir->i_ino, dentry->d_name.name);
@@ -1601,9 +1601,6 @@ static int nfs_create(struct inode *dir, struct dentry *dentry,
        attr.ia_mode = mode;
        attr.ia_valid = ATTR_MODE;
 
-       if (nd && !(nd->flags & LOOKUP_EXCL))
-               open_flags = O_CREAT;
-
        error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags);
        if (error != 0)
                goto out_err;
index 5e5f779db76ff71e2f8c9d82dcbd232fe471170c..1d0c0b84c5a319e61e24f04f3d643f9284b6cee6 100644 (file)
@@ -85,7 +85,7 @@ nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
  * with d_instantiate().
  */
 static int nilfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                       struct nameidata *nd)
+                       bool excl)
 {
        struct inode *inode;
        struct nilfs_transaction_info ti;
index e31d6ae013abba789b8d72591e8a460f6a8c7afc..83b6f98e0665433bda36a2f1d4f34a1ce7bec4cd 100644 (file)
@@ -526,7 +526,7 @@ bail:
 static int dlmfs_create(struct inode *dir,
                        struct dentry *dentry,
                        umode_t mode,
-                       struct nameidata *nd)
+                       bool excl)
 {
        int status = 0;
        struct inode *inode;
index fd71f6e5841f9199675afb913bf296ade1f63edc..f1fd0741162b63baeaed44d6f4118a23df7c3c32 100644 (file)
@@ -618,7 +618,7 @@ static int ocfs2_mkdir(struct inode *dir,
 static int ocfs2_create(struct inode *dir,
                        struct dentry *dentry,
                        umode_t mode,
-                       struct nameidata *nd)
+                       bool excl)
 {
        int ret;
 
index 3d254872e641ea2ca1548dfc3bacce5163d65a7a..fb5b3ff79dc6c232161fd89e35d4a23079a62a74 100644 (file)
@@ -285,7 +285,7 @@ static int omfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 }
 
 static int omfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-               struct nameidata *nd)
+               bool excl)
 {
        return omfs_add_node(dir, dentry, mode | S_IFREG);
 }
index a1fdabe21dec4e93a42bc101d6a32b480cc89c23..eab8c09d3801ca00db98687c49f22b58a633ccc8 100644 (file)
@@ -114,7 +114,7 @@ static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
        return retval;
 }
 
-static int ramfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd)
+static int ramfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
 {
        return ramfs_mknod(dir, dentry, mode | S_IFREG, 0);
 }
index 1d9cf248c471877a647f249a64d326fb77db98e5..3916be1a330b2a80d9212b0a3901baba6e28706f 100644 (file)
@@ -573,7 +573,7 @@ static int new_inode_init(struct inode *inode, struct inode *dir, umode_t mode)
 }
 
 static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                          struct nameidata *nd)
+                          bool excl)
 {
        int retval;
        struct inode *inode;
index e6ad8d7dea6446f1ce4b294ed6a45fcc5eeddedc..d319963aeb1171e755018f966a3e1bff776cacf3 100644 (file)
@@ -62,7 +62,7 @@
 static int xattr_create(struct inode *dir, struct dentry *dentry, int mode)
 {
        BUG_ON(!mutex_is_locked(&dir->i_mutex));
-       return dir->i_op->create(dir, dentry, mode, NULL);
+       return dir->i_op->create(dir, dentry, mode, true);
 }
 #endif
 
index a8c4359cd0e18c8afe2f51dd56c5ebbdd4d7a9c5..1c0d5f264767df5ebc7bf0dc77a0267b097a4052 100644 (file)
@@ -80,7 +80,7 @@ static int sysv_mknod(struct inode * dir, struct dentry * dentry, umode_t mode,
        return err;
 }
 
-static int sysv_create(struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd)
+static int sysv_create(struct inode * dir, struct dentry * dentry, umode_t mode, bool excl)
 {
        return sysv_mknod(dir, dentry, mode, 0);
 }
index 845b2df083174268a721655c187902a7951dd416..b1cca89aeb6865d52d15d00b9ff8501b45b5501b 100644 (file)
@@ -246,7 +246,7 @@ out:
 }
 
 static int ubifs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                       struct nameidata *nd)
+                       bool excl)
 {
        struct inode *inode;
        struct ubifs_info *c = dir->i_sb->s_fs_info;
index 929cc205985ab9fa406ec421522159a240a4bcbb..544b2799a9114c4620844bec32b9921881da97b9 100644 (file)
@@ -551,7 +551,7 @@ static int udf_delete_entry(struct inode *inode, struct fileIdentDesc *fi,
 }
 
 static int udf_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-                     struct nameidata *nd)
+                     bool excl)
 {
        struct udf_fileident_bh fibh;
        struct inode *inode;
index bc77fa170b9dd236c0ae894fd3033bd5caea950e..90d74b8f8eba8dacd536c74ac161cceddc241196 100644 (file)
@@ -71,7 +71,7 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, unsi
  * with d_instantiate(). 
  */
 static int ufs_create (struct inode * dir, struct dentry * dentry, umode_t mode,
-               struct nameidata *nd)
+               bool excl)
 {
        struct inode *inode;
        int err;
index b41cfba14faf56a11790453aef3b388c43456637..9c4340f5c3e0ff92bb84505155c3ba4f9a4bac54 100644 (file)
@@ -179,7 +179,7 @@ xfs_vn_create(
        struct inode    *dir,
        struct dentry   *dentry,
        umode_t         mode,
-       struct nameidata *nd)
+       bool            flags)
 {
        return xfs_vn_mknod(dir, dentry, mode, 0);
 }
index 7a71709b7fa7cb64b8e5d4e48c7d6991a28447c0..df869d248e7c9b07b694cdb4c560dd5a7366ae2b 100644 (file)
@@ -1674,7 +1674,7 @@ struct inode_operations {
        int (*readlink) (struct dentry *, char __user *,int);
        void (*put_link) (struct dentry *, struct nameidata *, void *);
 
-       int (*create) (struct inode *,struct dentry *,umode_t,struct nameidata *);
+       int (*create) (struct inode *,struct dentry *, umode_t, bool);
        int (*link) (struct dentry *,struct inode *,struct dentry *);
        int (*unlink) (struct inode *,struct dentry *);
        int (*symlink) (struct inode *,struct dentry *,const char *);
index 8ce57691e7b60994d9cc97620b7550c603df5391..da2c188688b153310b27e906c289f686d403d9b2 100644 (file)
@@ -413,7 +413,7 @@ static void mqueue_evict_inode(struct inode *inode)
 }
 
 static int mqueue_create(struct inode *dir, struct dentry *dentry,
-                               umode_t mode, struct nameidata *nd)
+                               umode_t mode, bool excl)
 {
        struct inode *inode;
        struct mq_attr *attr = dentry->d_fsdata;
index bd106361be4bf2d080e67f11252198c710745278..c15b998e5a860f9d3c375ad31ce9d5f34fbb5ea0 100644 (file)
@@ -1877,7 +1877,7 @@ static int shmem_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 }
 
 static int shmem_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-               struct nameidata *nd)
+               bool excl)
 {
        return shmem_mknod(dir, dentry, mode | S_IFREG, 0);
 }