diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-10 18:05:36 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 08:34:47 -0400 |
| commit | ebfc3b49a7ac25920cb5be5445f602e51d2ea559 (patch) | |
| tree | c3241f875dd04ab9f63b4e7ded7ed206e4df1b9f | |
| parent | 72bd866a01fc62ccbc466f3eb7599b14c937e96b (diff) | |
don't pass nameidata to ->create()
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, 62 insertions, 64 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 33f2c8f1db8..e0cce2a5f82 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
| @@ -37,7 +37,7 @@ d_manage: no no yes (ref-walk) maybe | |||
| 37 | 37 | ||
| 38 | --------------------------- inode_operations --------------------------- | 38 | --------------------------- inode_operations --------------------------- |
| 39 | prototypes: | 39 | prototypes: |
| 40 | int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *); | 40 | int (*create) (struct inode *,struct dentry *,umode_t, bool); |
| 41 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); | 41 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); |
| 42 | int (*link) (struct dentry *,struct inode *,struct dentry *); | 42 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
| 43 | int (*unlink) (struct inode *,struct dentry *); | 43 | int (*unlink) (struct inode *,struct dentry *); |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 690f573928b..2bef2b3843d 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
| @@ -436,3 +436,9 @@ d_make_root() drops the reference to inode if dentry allocation fails. | |||
| 436 | [mandatory] | 436 | [mandatory] |
| 437 | The witch is dead! Well, 2/3 of it, anyway. ->d_revalidate() and | 437 | The witch is dead! Well, 2/3 of it, anyway. ->d_revalidate() and |
| 438 | ->lookup() do *not* take struct nameidata anymore; just the flags. | 438 | ->lookup() do *not* take struct nameidata anymore; just the flags. |
| 439 | -- | ||
| 440 | [mandatory] | ||
| 441 | ->create() doesn't take struct nameidata *; unlike the previous | ||
| 442 | two, it gets "is it an O_EXCL or equivalent?" boolean argument. Note that | ||
| 443 | local filesystems can ignore tha argument - they are guaranteed that the | ||
| 444 | object doesn't exist. It's remote/distributed ones that might care... | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index ee786354946..aa754e01464 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
| @@ -341,7 +341,7 @@ This describes how the VFS can manipulate an inode in your | |||
| 341 | filesystem. As of kernel 2.6.22, the following members are defined: | 341 | filesystem. As of kernel 2.6.22, the following members are defined: |
| 342 | 342 | ||
| 343 | struct inode_operations { | 343 | struct inode_operations { |
| 344 | int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *); | 344 | int (*create) (struct inode *,struct dentry *, umode_t, bool); |
| 345 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); | 345 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); |
| 346 | int (*link) (struct dentry *,struct inode *,struct dentry *); | 346 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
| 347 | int (*unlink) (struct inode *,struct dentry *); | 347 | int (*unlink) (struct inode *,struct dentry *); |
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index bb0d7627f95..cbf9dbb1b2a 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
| @@ -725,7 +725,7 @@ error: | |||
| 725 | 725 | ||
| 726 | static int | 726 | static int |
| 727 | v9fs_vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 727 | v9fs_vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 728 | struct nameidata *nd) | 728 | bool excl) |
| 729 | { | 729 | { |
| 730 | struct v9fs_session_info *v9ses = v9fs_inode2v9ses(dir); | 730 | struct v9fs_session_info *v9ses = v9fs_inode2v9ses(dir); |
| 731 | u32 perm = unixmode2p9mode(v9ses, mode); | 731 | u32 perm = unixmode2p9mode(v9ses, mode); |
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index b97619fed19..40895546e10 100644 --- a/fs/9p/vfs_inode_dotl.c +++ b/fs/9p/vfs_inode_dotl.c | |||
| @@ -235,7 +235,7 @@ int v9fs_open_to_dotl_flags(int flags) | |||
| 235 | 235 | ||
| 236 | static int | 236 | static int |
| 237 | v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode, | 237 | v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode, |
| 238 | struct nameidata *nd) | 238 | bool excl) |
| 239 | { | 239 | { |
| 240 | return v9fs_vfs_mknod_dotl(dir, dentry, omode, 0); | 240 | return v9fs_vfs_mknod_dotl(dir, dentry, omode, 0); |
| 241 | } | 241 | } |
diff --git a/fs/affs/affs.h b/fs/affs/affs.h index 49e4e3457bf..6e216419f34 100644 --- a/fs/affs/affs.h +++ b/fs/affs/affs.h | |||
| @@ -155,7 +155,7 @@ extern void affs_free_bitmap(struct super_block *sb); | |||
| 155 | extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len); | 155 | extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len); |
| 156 | extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int); | 156 | extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int); |
| 157 | extern int affs_unlink(struct inode *dir, struct dentry *dentry); | 157 | extern int affs_unlink(struct inode *dir, struct dentry *dentry); |
| 158 | extern int affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *); | 158 | extern int affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool); |
| 159 | extern int affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); | 159 | extern int affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); |
| 160 | extern int affs_rmdir(struct inode *dir, struct dentry *dentry); | 160 | extern int affs_rmdir(struct inode *dir, struct dentry *dentry); |
| 161 | extern int affs_link(struct dentry *olddentry, struct inode *dir, | 161 | extern int affs_link(struct dentry *olddentry, struct inode *dir, |
diff --git a/fs/affs/namei.c b/fs/affs/namei.c index 7f9721be709..ff65884a783 100644 --- a/fs/affs/namei.c +++ b/fs/affs/namei.c | |||
| @@ -255,7 +255,7 @@ affs_unlink(struct inode *dir, struct dentry *dentry) | |||
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | int | 257 | int |
| 258 | affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) | 258 | affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) |
| 259 | { | 259 | { |
| 260 | struct super_block *sb = dir->i_sb; | 260 | struct super_block *sb = dir->i_sb; |
| 261 | struct inode *inode; | 261 | struct inode *inode; |
diff --git a/fs/afs/dir.c b/fs/afs/dir.c index ffb33e36ea7..db477906ba4 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c | |||
| @@ -29,7 +29,7 @@ static void afs_d_release(struct dentry *dentry); | |||
| 29 | static int afs_lookup_filldir(void *_cookie, const char *name, int nlen, | 29 | static int afs_lookup_filldir(void *_cookie, const char *name, int nlen, |
| 30 | loff_t fpos, u64 ino, unsigned dtype); | 30 | loff_t fpos, u64 ino, unsigned dtype); |
| 31 | static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 31 | static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 32 | struct nameidata *nd); | 32 | bool excl); |
| 33 | static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); | 33 | static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); |
| 34 | static int afs_rmdir(struct inode *dir, struct dentry *dentry); | 34 | static int afs_rmdir(struct inode *dir, struct dentry *dentry); |
| 35 | static int afs_unlink(struct inode *dir, struct dentry *dentry); | 35 | static int afs_unlink(struct inode *dir, struct dentry *dentry); |
| @@ -949,7 +949,7 @@ error: | |||
| 949 | * create a regular file on an AFS filesystem | 949 | * create a regular file on an AFS filesystem |
| 950 | */ | 950 | */ |
| 951 | static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 951 | static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 952 | struct nameidata *nd) | 952 | bool excl) |
| 953 | { | 953 | { |
| 954 | struct afs_file_status status; | 954 | struct afs_file_status status; |
| 955 | struct afs_callback cb; | 955 | struct afs_callback cb; |
diff --git a/fs/bad_inode.c b/fs/bad_inode.c index d27e73c69ba..b1342ffb3cf 100644 --- a/fs/bad_inode.c +++ b/fs/bad_inode.c | |||
| @@ -173,7 +173,7 @@ static const struct file_operations bad_file_ops = | |||
| 173 | }; | 173 | }; |
| 174 | 174 | ||
| 175 | static int bad_inode_create (struct inode *dir, struct dentry *dentry, | 175 | static int bad_inode_create (struct inode *dir, struct dentry *dentry, |
| 176 | umode_t mode, struct nameidata *nd) | 176 | umode_t mode, bool excl) |
| 177 | { | 177 | { |
| 178 | return -EIO; | 178 | return -EIO; |
| 179 | } | 179 | } |
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index 3f1cd3b7168..2785ef91191 100644 --- a/fs/bfs/dir.c +++ b/fs/bfs/dir.c | |||
| @@ -85,7 +85,7 @@ const struct file_operations bfs_dir_operations = { | |||
| 85 | extern void dump_imap(const char *, struct super_block *); | 85 | extern void dump_imap(const char *, struct super_block *); |
| 86 | 86 | ||
| 87 | static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 87 | static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 88 | struct nameidata *nd) | 88 | bool excl) |
| 89 | { | 89 | { |
| 90 | int err; | 90 | int err; |
| 91 | struct inode *inode; | 91 | struct inode *inode; |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e5f1f81b2d6..fb8d671d00e 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
| @@ -4893,7 +4893,7 @@ out_unlock: | |||
| 4893 | } | 4893 | } |
| 4894 | 4894 | ||
| 4895 | static int btrfs_create(struct inode *dir, struct dentry *dentry, | 4895 | static int btrfs_create(struct inode *dir, struct dentry *dentry, |
| 4896 | umode_t mode, struct nameidata *nd) | 4896 | umode_t mode, bool excl) |
| 4897 | { | 4897 | { |
| 4898 | struct btrfs_trans_handle *trans; | 4898 | struct btrfs_trans_handle *trans; |
| 4899 | struct btrfs_root *root = BTRFS_I(dir)->root; | 4899 | struct btrfs_root *root = BTRFS_I(dir)->root; |
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 74b2f3c54fe..00894ff9246 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
| @@ -730,7 +730,7 @@ static int ceph_mknod(struct inode *dir, struct dentry *dentry, | |||
| 730 | } | 730 | } |
| 731 | 731 | ||
| 732 | static int ceph_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 732 | static int ceph_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 733 | struct nameidata *nd) | 733 | bool excl) |
| 734 | { | 734 | { |
| 735 | return ceph_mknod(dir, dentry, mode, 0); | 735 | return ceph_mknod(dir, dentry, mode, 0); |
| 736 | } | 736 | } |
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index 1abd31fd5bf..1c49c5a9b27 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
| @@ -45,7 +45,7 @@ extern const struct address_space_operations cifs_addr_ops_smallbuf; | |||
| 45 | extern const struct inode_operations cifs_dir_inode_ops; | 45 | extern const struct inode_operations cifs_dir_inode_ops; |
| 46 | extern struct inode *cifs_root_iget(struct super_block *); | 46 | extern struct inode *cifs_root_iget(struct super_block *); |
| 47 | extern int cifs_create(struct inode *, struct dentry *, umode_t, | 47 | extern int cifs_create(struct inode *, struct dentry *, umode_t, |
| 48 | struct nameidata *); | 48 | bool excl); |
| 49 | extern int cifs_atomic_open(struct inode *, struct dentry *, | 49 | extern int cifs_atomic_open(struct inode *, struct dentry *, |
| 50 | struct file *, unsigned, umode_t, | 50 | struct file *, unsigned, umode_t, |
| 51 | int *); | 51 | int *); |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 2d732b9276e..a180265a10b 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
| @@ -451,7 +451,7 @@ free_xid: | |||
| 451 | } | 451 | } |
| 452 | 452 | ||
| 453 | int cifs_create(struct inode *inode, struct dentry *direntry, umode_t mode, | 453 | int cifs_create(struct inode *inode, struct dentry *direntry, umode_t mode, |
| 454 | struct nameidata *nd) | 454 | bool excl) |
| 455 | { | 455 | { |
| 456 | int rc; | 456 | int rc; |
| 457 | int xid = GetXid(); | 457 | int xid = GetXid(); |
diff --git a/fs/coda/dir.c b/fs/coda/dir.c index da35e965861..49fe52d2560 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #include "coda_int.h" | 30 | #include "coda_int.h" |
| 31 | 31 | ||
| 32 | /* dir inode-ops */ | 32 | /* dir inode-ops */ |
| 33 | static int coda_create(struct inode *dir, struct dentry *new, umode_t mode, struct nameidata *nd); | 33 | static int coda_create(struct inode *dir, struct dentry *new, umode_t mode, bool excl); |
| 34 | static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, unsigned int flags); | 34 | static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, unsigned int flags); |
| 35 | static int coda_link(struct dentry *old_dentry, struct inode *dir_inode, | 35 | static int coda_link(struct dentry *old_dentry, struct inode *dir_inode, |
| 36 | struct dentry *entry); | 36 | struct dentry *entry); |
| @@ -188,7 +188,7 @@ static inline void coda_dir_drop_nlink(struct inode *dir) | |||
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | /* creation routines: create, mknod, mkdir, link, symlink */ | 190 | /* creation routines: create, mknod, mkdir, link, symlink */ |
| 191 | static int coda_create(struct inode *dir, struct dentry *de, umode_t mode, struct nameidata *nd) | 191 | static int coda_create(struct inode *dir, struct dentry *de, umode_t mode, bool excl) |
| 192 | { | 192 | { |
| 193 | int error; | 193 | int error; |
| 194 | const char *name=de->d_name.name; | 194 | const char *name=de->d_name.name; |
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 4ab50c3f5ab..f079dafea75 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
| @@ -240,7 +240,6 @@ out: | |||
| 240 | * @dir: The inode of the directory in which to create the file. | 240 | * @dir: The inode of the directory in which to create the file. |
| 241 | * @dentry: The eCryptfs dentry | 241 | * @dentry: The eCryptfs dentry |
| 242 | * @mode: The mode of the new file. | 242 | * @mode: The mode of the new file. |
| 243 | * @nd: nameidata | ||
| 244 | * | 243 | * |
| 245 | * Creates a new file. | 244 | * Creates a new file. |
| 246 | * | 245 | * |
| @@ -248,7 +247,7 @@ out: | |||
| 248 | */ | 247 | */ |
| 249 | static int | 248 | static int |
| 250 | ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry, | 249 | ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry, |
| 251 | umode_t mode, struct nameidata *nd) | 250 | umode_t mode, bool excl) |
| 252 | { | 251 | { |
| 253 | struct inode *ecryptfs_inode; | 252 | struct inode *ecryptfs_inode; |
| 254 | int rc; | 253 | int rc; |
diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c index 909ed6ea4cf..4731fd991ef 100644 --- a/fs/exofs/namei.c +++ b/fs/exofs/namei.c | |||
| @@ -60,7 +60,7 @@ static struct dentry *exofs_lookup(struct inode *dir, struct dentry *dentry, | |||
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | static int exofs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 62 | static int exofs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 63 | struct nameidata *nd) | 63 | bool excl) |
| 64 | { | 64 | { |
| 65 | struct inode *inode = exofs_new_inode(dir, mode); | 65 | struct inode *inode = exofs_new_inode(dir, mode); |
| 66 | int err = PTR_ERR(inode); | 66 | int err = PTR_ERR(inode); |
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index b3e6778cd1e..9ba7de0e590 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c | |||
| @@ -94,7 +94,7 @@ struct dentry *ext2_get_parent(struct dentry *child) | |||
| 94 | * If the create succeeds, we fill in the inode information | 94 | * If the create succeeds, we fill in the inode information |
| 95 | * with d_instantiate(). | 95 | * with d_instantiate(). |
| 96 | */ | 96 | */ |
| 97 | static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd) | 97 | static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, bool excl) |
| 98 | { | 98 | { |
| 99 | struct inode *inode; | 99 | struct inode *inode; |
| 100 | 100 | ||
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 86d25f3f604..85286dbe275 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c | |||
| @@ -1690,7 +1690,7 @@ static int ext3_add_nondir(handle_t *handle, | |||
| 1690 | * with d_instantiate(). | 1690 | * with d_instantiate(). |
| 1691 | */ | 1691 | */ |
| 1692 | static int ext3_create (struct inode * dir, struct dentry * dentry, umode_t mode, | 1692 | static int ext3_create (struct inode * dir, struct dentry * dentry, umode_t mode, |
| 1693 | struct nameidata *nd) | 1693 | bool excl) |
| 1694 | { | 1694 | { |
| 1695 | handle_t *handle; | 1695 | handle_t *handle; |
| 1696 | struct inode * inode; | 1696 | struct inode * inode; |
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 4fba3cd42e2..eca3e48a62f 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
| @@ -2091,7 +2091,7 @@ static int ext4_add_nondir(handle_t *handle, | |||
| 2091 | * with d_instantiate(). | 2091 | * with d_instantiate(). |
| 2092 | */ | 2092 | */ |
| 2093 | static int ext4_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 2093 | static int ext4_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 2094 | struct nameidata *nd) | 2094 | bool excl) |
| 2095 | { | 2095 | { |
| 2096 | handle_t *handle; | 2096 | handle_t *handle; |
| 2097 | struct inode *inode; | 2097 | struct inode *inode; |
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c index 47c608b0529..70d993a9380 100644 --- a/fs/fat/namei_msdos.c +++ b/fs/fat/namei_msdos.c | |||
| @@ -265,7 +265,7 @@ static int msdos_add_entry(struct inode *dir, const unsigned char *name, | |||
| 265 | 265 | ||
| 266 | /***** Create a file */ | 266 | /***** Create a file */ |
| 267 | static int msdos_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 267 | static int msdos_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 268 | struct nameidata *nd) | 268 | bool excl) |
| 269 | { | 269 | { |
| 270 | struct super_block *sb = dir->i_sb; | 270 | struct super_block *sb = dir->i_sb; |
| 271 | struct inode *inode = NULL; | 271 | struct inode *inode = NULL; |
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index 44152571524..6cc48065243 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c | |||
| @@ -772,7 +772,7 @@ error: | |||
| 772 | } | 772 | } |
| 773 | 773 | ||
| 774 | static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 774 | static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 775 | struct nameidata *nd) | 775 | bool excl) |
| 776 | { | 776 | { |
| 777 | struct super_block *sb = dir->i_sb; | 777 | struct super_block *sb = dir->i_sb; |
| 778 | struct inode *inode; | 778 | struct inode *inode; |
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 385235ac137..8964cf3999b 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
| @@ -611,7 +611,7 @@ static int fuse_mknod(struct inode *dir, struct dentry *entry, umode_t mode, | |||
| 611 | } | 611 | } |
| 612 | 612 | ||
| 613 | static int fuse_create(struct inode *dir, struct dentry *entry, umode_t mode, | 613 | static int fuse_create(struct inode *dir, struct dentry *entry, umode_t mode, |
| 614 | struct nameidata *nd) | 614 | bool excl) |
| 615 | { | 615 | { |
| 616 | return fuse_mknod(dir, entry, mode, 0); | 616 | return fuse_mknod(dir, entry, mode, 0); |
| 617 | } | 617 | } |
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 19e443b7335..867674785fc 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
| @@ -755,11 +755,8 @@ fail: | |||
| 755 | */ | 755 | */ |
| 756 | 756 | ||
| 757 | static int gfs2_create(struct inode *dir, struct dentry *dentry, | 757 | static int gfs2_create(struct inode *dir, struct dentry *dentry, |
| 758 | umode_t mode, struct nameidata *nd) | 758 | umode_t mode, bool excl) |
| 759 | { | 759 | { |
| 760 | int excl = 0; | ||
| 761 | if (nd && (nd->flags & LOOKUP_EXCL)) | ||
| 762 | excl = 1; | ||
| 763 | return gfs2_create_inode(dir, dentry, S_IFREG | mode, 0, NULL, 0, excl); | 760 | return gfs2_create_inode(dir, dentry, S_IFREG | mode, 0, NULL, 0, excl); |
| 764 | } | 761 | } |
| 765 | 762 | ||
diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c index 617b1ed71f5..422dde2ec0a 100644 --- a/fs/hfs/dir.c +++ b/fs/hfs/dir.c | |||
| @@ -187,7 +187,7 @@ static int hfs_dir_release(struct inode *inode, struct file *file) | |||
| 187 | * the directory and the name (and its length) of the new file. | 187 | * the directory and the name (and its length) of the new file. |
| 188 | */ | 188 | */ |
| 189 | static int hfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 189 | static int hfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 190 | struct nameidata *nd) | 190 | bool excl) |
| 191 | { | 191 | { |
| 192 | struct inode *inode; | 192 | struct inode *inode; |
| 193 | int res; | 193 | int res; |
diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c index 90c2f78b2c7..378ea0c43f1 100644 --- a/fs/hfsplus/dir.c +++ b/fs/hfsplus/dir.c | |||
| @@ -465,7 +465,7 @@ out: | |||
| 465 | } | 465 | } |
| 466 | 466 | ||
| 467 | static int hfsplus_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 467 | static int hfsplus_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 468 | struct nameidata *nd) | 468 | bool excl) |
| 469 | { | 469 | { |
| 470 | return hfsplus_mknod(dir, dentry, mode, 0); | 470 | return hfsplus_mknod(dir, dentry, mode, 0); |
| 471 | } | 471 | } |
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 0ea005228e1..124146543aa 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c | |||
| @@ -553,7 +553,7 @@ static int read_name(struct inode *ino, char *name) | |||
| 553 | } | 553 | } |
| 554 | 554 | ||
| 555 | int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 555 | int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 556 | struct nameidata *nd) | 556 | bool excl) |
| 557 | { | 557 | { |
| 558 | struct inode *inode; | 558 | struct inode *inode; |
| 559 | char *name; | 559 | char *name; |
diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index 9083ef8af58..bc9082482f6 100644 --- a/fs/hpfs/namei.c +++ b/fs/hpfs/namei.c | |||
| @@ -115,7 +115,7 @@ bail: | |||
| 115 | return err; | 115 | return err; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) | 118 | static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) |
| 119 | { | 119 | { |
| 120 | const unsigned char *name = dentry->d_name.name; | 120 | const unsigned char *name = dentry->d_name.name; |
| 121 | unsigned len = dentry->d_name.len; | 121 | unsigned len = dentry->d_name.len; |
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index cc9281b6c62..e13e9bdb0bf 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
| @@ -565,7 +565,7 @@ static int hugetlbfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mod | |||
| 565 | return retval; | 565 | return retval; |
| 566 | } | 566 | } |
| 567 | 567 | ||
| 568 | static int hugetlbfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) | 568 | static int hugetlbfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) |
| 569 | { | 569 | { |
| 570 | return hugetlbfs_mknod(dir, dentry, mode | S_IFREG, 0); | 570 | return hugetlbfs_mknod(dir, dentry, mode | S_IFREG, 0); |
| 571 | } | 571 | } |
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index 6a601673f89..23245191c5b 100644 --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | static int jffs2_readdir (struct file *, void *, filldir_t); | 25 | static int jffs2_readdir (struct file *, void *, filldir_t); |
| 26 | 26 | ||
| 27 | static int jffs2_create (struct inode *,struct dentry *,umode_t, | 27 | static int jffs2_create (struct inode *,struct dentry *,umode_t, |
| 28 | struct nameidata *); | 28 | bool); |
| 29 | static struct dentry *jffs2_lookup (struct inode *,struct dentry *, | 29 | static struct dentry *jffs2_lookup (struct inode *,struct dentry *, |
| 30 | unsigned int); | 30 | unsigned int); |
| 31 | static int jffs2_link (struct dentry *,struct inode *,struct dentry *); | 31 | 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) | |||
| 175 | 175 | ||
| 176 | 176 | ||
| 177 | static int jffs2_create(struct inode *dir_i, struct dentry *dentry, | 177 | static int jffs2_create(struct inode *dir_i, struct dentry *dentry, |
| 178 | umode_t mode, struct nameidata *nd) | 178 | umode_t mode, bool excl) |
| 179 | { | 179 | { |
| 180 | struct jffs2_raw_inode *ri; | 180 | struct jffs2_raw_inode *ri; |
| 181 | struct jffs2_inode_info *f, *dir_f; | 181 | struct jffs2_inode_info *f, *dir_f; |
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 34fe85555ca..c426293e16c 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c | |||
| @@ -73,7 +73,7 @@ static inline void free_ea_wmap(struct inode *inode) | |||
| 73 | * | 73 | * |
| 74 | */ | 74 | */ |
| 75 | static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode, | 75 | static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode, |
| 76 | struct nameidata *nd) | 76 | bool excl) |
| 77 | { | 77 | { |
| 78 | int rc = 0; | 78 | int rc = 0; |
| 79 | tid_t tid; /* transaction id */ | 79 | tid_t tid; /* transaction id */ |
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index 8a3dcc615b3..26e4a941532 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c | |||
| @@ -502,7 +502,7 @@ static int logfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
| 502 | } | 502 | } |
| 503 | 503 | ||
| 504 | static int logfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 504 | static int logfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 505 | struct nameidata *nd) | 505 | bool excl) |
| 506 | { | 506 | { |
| 507 | struct inode *inode; | 507 | struct inode *inode; |
| 508 | 508 | ||
diff --git a/fs/minix/namei.c b/fs/minix/namei.c index 1f245240ea0..0db73d9dd66 100644 --- a/fs/minix/namei.c +++ b/fs/minix/namei.c | |||
| @@ -55,7 +55,7 @@ static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, | |||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | static int minix_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 57 | static int minix_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 58 | struct nameidata *nd) | 58 | bool excl) |
| 59 | { | 59 | { |
| 60 | return minix_mknod(dir, dentry, mode, 0); | 60 | return minix_mknod(dir, dentry, mode, 0); |
| 61 | } | 61 | } |
diff --git a/fs/namei.c b/fs/namei.c index fc01090a96c..fd71156bfd7 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
| @@ -2082,7 +2082,6 @@ int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |||
| 2082 | struct nameidata *nd) | 2082 | struct nameidata *nd) |
| 2083 | { | 2083 | { |
| 2084 | int error = may_create(dir, dentry); | 2084 | int error = may_create(dir, dentry); |
| 2085 | |||
| 2086 | if (error) | 2085 | if (error) |
| 2087 | return error; | 2086 | return error; |
| 2088 | 2087 | ||
| @@ -2093,7 +2092,7 @@ int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |||
| 2093 | error = security_inode_create(dir, dentry, mode); | 2092 | error = security_inode_create(dir, dentry, mode); |
| 2094 | if (error) | 2093 | if (error) |
| 2095 | return error; | 2094 | return error; |
| 2096 | error = dir->i_op->create(dir, dentry, mode, nd); | 2095 | error = dir->i_op->create(dir, dentry, mode, !nd || (nd->flags & LOOKUP_EXCL)); |
| 2097 | if (!error) | 2096 | if (!error) |
| 2098 | fsnotify_create(dir, dentry); | 2097 | fsnotify_create(dir, dentry); |
| 2099 | return error; | 2098 | return error; |
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index a0cff22bfc9..4117e7b377b 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c | |||
| @@ -30,7 +30,7 @@ static void ncp_do_readdir(struct file *, void *, filldir_t, | |||
| 30 | 30 | ||
| 31 | static int ncp_readdir(struct file *, void *, filldir_t); | 31 | static int ncp_readdir(struct file *, void *, filldir_t); |
| 32 | 32 | ||
| 33 | static int ncp_create(struct inode *, struct dentry *, umode_t, struct nameidata *); | 33 | static int ncp_create(struct inode *, struct dentry *, umode_t, bool); |
| 34 | static struct dentry *ncp_lookup(struct inode *, struct dentry *, unsigned int); | 34 | static struct dentry *ncp_lookup(struct inode *, struct dentry *, unsigned int); |
| 35 | static int ncp_unlink(struct inode *, struct dentry *); | 35 | static int ncp_unlink(struct inode *, struct dentry *); |
| 36 | static int ncp_mkdir(struct inode *, struct dentry *, umode_t); | 36 | static int ncp_mkdir(struct inode *, struct dentry *, umode_t); |
| @@ -980,7 +980,7 @@ out: | |||
| 980 | } | 980 | } |
| 981 | 981 | ||
| 982 | static int ncp_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 982 | static int ncp_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 983 | struct nameidata *nd) | 983 | bool excl) |
| 984 | { | 984 | { |
| 985 | return ncp_create_new(dir, dentry, mode, 0, 0); | 985 | return ncp_create_new(dir, dentry, mode, 0, 0); |
| 986 | } | 986 | } |
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 8f21205c589..a6b1c7fb823 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
| @@ -47,7 +47,7 @@ static int nfs_opendir(struct inode *, struct file *); | |||
| 47 | static int nfs_closedir(struct inode *, struct file *); | 47 | static int nfs_closedir(struct inode *, struct file *); |
| 48 | static int nfs_readdir(struct file *, void *, filldir_t); | 48 | static int nfs_readdir(struct file *, void *, filldir_t); |
| 49 | static struct dentry *nfs_lookup(struct inode *, struct dentry *, unsigned int); | 49 | static struct dentry *nfs_lookup(struct inode *, struct dentry *, unsigned int); |
| 50 | static int nfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *); | 50 | static int nfs_create(struct inode *, struct dentry *, umode_t, bool); |
| 51 | static int nfs_mkdir(struct inode *, struct dentry *, umode_t); | 51 | static int nfs_mkdir(struct inode *, struct dentry *, umode_t); |
| 52 | static int nfs_rmdir(struct inode *, struct dentry *); | 52 | static int nfs_rmdir(struct inode *, struct dentry *); |
| 53 | static int nfs_unlink(struct inode *, struct dentry *); | 53 | static int nfs_unlink(struct inode *, struct dentry *); |
| @@ -1589,11 +1589,11 @@ out_error: | |||
| 1589 | * reply path made it appear to have failed. | 1589 | * reply path made it appear to have failed. |
| 1590 | */ | 1590 | */ |
| 1591 | static int nfs_create(struct inode *dir, struct dentry *dentry, | 1591 | static int nfs_create(struct inode *dir, struct dentry *dentry, |
| 1592 | umode_t mode, struct nameidata *nd) | 1592 | umode_t mode, bool excl) |
| 1593 | { | 1593 | { |
| 1594 | struct iattr attr; | 1594 | struct iattr attr; |
| 1595 | int open_flags = excl ? O_CREAT | O_EXCL : O_CREAT; | ||
| 1595 | int error; | 1596 | int error; |
| 1596 | int open_flags = O_CREAT|O_EXCL; | ||
| 1597 | 1597 | ||
| 1598 | dfprintk(VFS, "NFS: create(%s/%ld), %s\n", | 1598 | dfprintk(VFS, "NFS: create(%s/%ld), %s\n", |
| 1599 | dir->i_sb->s_id, dir->i_ino, dentry->d_name.name); | 1599 | 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, | |||
| 1601 | attr.ia_mode = mode; | 1601 | attr.ia_mode = mode; |
| 1602 | attr.ia_valid = ATTR_MODE; | 1602 | attr.ia_valid = ATTR_MODE; |
| 1603 | 1603 | ||
| 1604 | if (nd && !(nd->flags & LOOKUP_EXCL)) | ||
| 1605 | open_flags = O_CREAT; | ||
| 1606 | |||
| 1607 | error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags); | 1604 | error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags); |
| 1608 | if (error != 0) | 1605 | if (error != 0) |
| 1609 | goto out_err; | 1606 | goto out_err; |
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c index 5e5f779db76..1d0c0b84c5a 100644 --- a/fs/nilfs2/namei.c +++ b/fs/nilfs2/namei.c | |||
| @@ -85,7 +85,7 @@ nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) | |||
| 85 | * with d_instantiate(). | 85 | * with d_instantiate(). |
| 86 | */ | 86 | */ |
| 87 | static int nilfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 87 | static int nilfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 88 | struct nameidata *nd) | 88 | bool excl) |
| 89 | { | 89 | { |
| 90 | struct inode *inode; | 90 | struct inode *inode; |
| 91 | struct nilfs_transaction_info ti; | 91 | struct nilfs_transaction_info ti; |
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index e31d6ae013a..83b6f98e066 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c | |||
| @@ -526,7 +526,7 @@ bail: | |||
| 526 | static int dlmfs_create(struct inode *dir, | 526 | static int dlmfs_create(struct inode *dir, |
| 527 | struct dentry *dentry, | 527 | struct dentry *dentry, |
| 528 | umode_t mode, | 528 | umode_t mode, |
| 529 | struct nameidata *nd) | 529 | bool excl) |
| 530 | { | 530 | { |
| 531 | int status = 0; | 531 | int status = 0; |
| 532 | struct inode *inode; | 532 | struct inode *inode; |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index fd71f6e5841..f1fd0741162 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
| @@ -618,7 +618,7 @@ static int ocfs2_mkdir(struct inode *dir, | |||
| 618 | static int ocfs2_create(struct inode *dir, | 618 | static int ocfs2_create(struct inode *dir, |
| 619 | struct dentry *dentry, | 619 | struct dentry *dentry, |
| 620 | umode_t mode, | 620 | umode_t mode, |
| 621 | struct nameidata *nd) | 621 | bool excl) |
| 622 | { | 622 | { |
| 623 | int ret; | 623 | int ret; |
| 624 | 624 | ||
diff --git a/fs/omfs/dir.c b/fs/omfs/dir.c index 3d254872e64..fb5b3ff79dc 100644 --- a/fs/omfs/dir.c +++ b/fs/omfs/dir.c | |||
| @@ -285,7 +285,7 @@ static int omfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | static int omfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 287 | static int omfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 288 | struct nameidata *nd) | 288 | bool excl) |
| 289 | { | 289 | { |
| 290 | return omfs_add_node(dir, dentry, mode | S_IFREG); | 290 | return omfs_add_node(dir, dentry, mode | S_IFREG); |
| 291 | } | 291 | } |
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index a1fdabe21de..eab8c09d380 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c | |||
| @@ -114,7 +114,7 @@ static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) | |||
| 114 | return retval; | 114 | return retval; |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | static int ramfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd) | 117 | static int ramfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) |
| 118 | { | 118 | { |
| 119 | return ramfs_mknod(dir, dentry, mode | S_IFREG, 0); | 119 | return ramfs_mknod(dir, dentry, mode | S_IFREG, 0); |
| 120 | } | 120 | } |
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index 1d9cf248c47..3916be1a330 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
| @@ -573,7 +573,7 @@ static int new_inode_init(struct inode *inode, struct inode *dir, umode_t mode) | |||
| 573 | } | 573 | } |
| 574 | 574 | ||
| 575 | static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 575 | static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 576 | struct nameidata *nd) | 576 | bool excl) |
| 577 | { | 577 | { |
| 578 | int retval; | 578 | int retval; |
| 579 | struct inode *inode; | 579 | struct inode *inode; |
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index e6ad8d7dea6..d319963aeb1 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
| @@ -62,7 +62,7 @@ | |||
| 62 | static int xattr_create(struct inode *dir, struct dentry *dentry, int mode) | 62 | static int xattr_create(struct inode *dir, struct dentry *dentry, int mode) |
| 63 | { | 63 | { |
| 64 | BUG_ON(!mutex_is_locked(&dir->i_mutex)); | 64 | BUG_ON(!mutex_is_locked(&dir->i_mutex)); |
| 65 | return dir->i_op->create(dir, dentry, mode, NULL); | 65 | return dir->i_op->create(dir, dentry, mode, true); |
| 66 | } | 66 | } |
| 67 | #endif | 67 | #endif |
| 68 | 68 | ||
diff --git a/fs/sysv/namei.c b/fs/sysv/namei.c index a8c4359cd0e..1c0d5f26476 100644 --- a/fs/sysv/namei.c +++ b/fs/sysv/namei.c | |||
| @@ -80,7 +80,7 @@ static int sysv_mknod(struct inode * dir, struct dentry * dentry, umode_t mode, | |||
| 80 | return err; | 80 | return err; |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | static int sysv_create(struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd) | 83 | static int sysv_create(struct inode * dir, struct dentry * dentry, umode_t mode, bool excl) |
| 84 | { | 84 | { |
| 85 | return sysv_mknod(dir, dentry, mode, 0); | 85 | return sysv_mknod(dir, dentry, mode, 0); |
| 86 | } | 86 | } |
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 845b2df0831..b1cca89aeb6 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c | |||
| @@ -246,7 +246,7 @@ out: | |||
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | static int ubifs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 248 | static int ubifs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 249 | struct nameidata *nd) | 249 | bool excl) |
| 250 | { | 250 | { |
| 251 | struct inode *inode; | 251 | struct inode *inode; |
| 252 | struct ubifs_info *c = dir->i_sb->s_fs_info; | 252 | struct ubifs_info *c = dir->i_sb->s_fs_info; |
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 929cc205985..544b2799a91 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c | |||
| @@ -551,7 +551,7 @@ static int udf_delete_entry(struct inode *inode, struct fileIdentDesc *fi, | |||
| 551 | } | 551 | } |
| 552 | 552 | ||
| 553 | static int udf_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 553 | static int udf_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 554 | struct nameidata *nd) | 554 | bool excl) |
| 555 | { | 555 | { |
| 556 | struct udf_fileident_bh fibh; | 556 | struct udf_fileident_bh fibh; |
| 557 | struct inode *inode; | 557 | struct inode *inode; |
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index bc77fa170b9..90d74b8f8eb 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c | |||
| @@ -71,7 +71,7 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, unsi | |||
| 71 | * with d_instantiate(). | 71 | * with d_instantiate(). |
| 72 | */ | 72 | */ |
| 73 | static int ufs_create (struct inode * dir, struct dentry * dentry, umode_t mode, | 73 | static int ufs_create (struct inode * dir, struct dentry * dentry, umode_t mode, |
| 74 | struct nameidata *nd) | 74 | bool excl) |
| 75 | { | 75 | { |
| 76 | struct inode *inode; | 76 | struct inode *inode; |
| 77 | int err; | 77 | int err; |
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index b41cfba14fa..9c4340f5c3e 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c | |||
| @@ -179,7 +179,7 @@ xfs_vn_create( | |||
| 179 | struct inode *dir, | 179 | struct inode *dir, |
| 180 | struct dentry *dentry, | 180 | struct dentry *dentry, |
| 181 | umode_t mode, | 181 | umode_t mode, |
| 182 | struct nameidata *nd) | 182 | bool flags) |
| 183 | { | 183 | { |
| 184 | return xfs_vn_mknod(dir, dentry, mode, 0); | 184 | return xfs_vn_mknod(dir, dentry, mode, 0); |
| 185 | } | 185 | } |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7a71709b7fa..df869d248e7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1674,7 +1674,7 @@ struct inode_operations { | |||
| 1674 | int (*readlink) (struct dentry *, char __user *,int); | 1674 | int (*readlink) (struct dentry *, char __user *,int); |
| 1675 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 1675 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
| 1676 | 1676 | ||
| 1677 | int (*create) (struct inode *,struct dentry *,umode_t,struct nameidata *); | 1677 | int (*create) (struct inode *,struct dentry *, umode_t, bool); |
| 1678 | int (*link) (struct dentry *,struct inode *,struct dentry *); | 1678 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
| 1679 | int (*unlink) (struct inode *,struct dentry *); | 1679 | int (*unlink) (struct inode *,struct dentry *); |
| 1680 | int (*symlink) (struct inode *,struct dentry *,const char *); | 1680 | int (*symlink) (struct inode *,struct dentry *,const char *); |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 8ce57691e7b..da2c188688b 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
| @@ -413,7 +413,7 @@ static void mqueue_evict_inode(struct inode *inode) | |||
| 413 | } | 413 | } |
| 414 | 414 | ||
| 415 | static int mqueue_create(struct inode *dir, struct dentry *dentry, | 415 | static int mqueue_create(struct inode *dir, struct dentry *dentry, |
| 416 | umode_t mode, struct nameidata *nd) | 416 | umode_t mode, bool excl) |
| 417 | { | 417 | { |
| 418 | struct inode *inode; | 418 | struct inode *inode; |
| 419 | struct mq_attr *attr = dentry->d_fsdata; | 419 | struct mq_attr *attr = dentry->d_fsdata; |
diff --git a/mm/shmem.c b/mm/shmem.c index bd106361be4..c15b998e5a8 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
| @@ -1877,7 +1877,7 @@ static int shmem_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
| 1877 | } | 1877 | } |
| 1878 | 1878 | ||
| 1879 | static int shmem_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 1879 | static int shmem_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 1880 | struct nameidata *nd) | 1880 | bool excl) |
| 1881 | { | 1881 | { |
| 1882 | return shmem_mknod(dir, dentry, mode | S_IFREG, 0); | 1882 | return shmem_mknod(dir, dentry, mode | S_IFREG, 0); |
| 1883 | } | 1883 | } |
