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 /fs/namei.c | |
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>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index fc01090a96c1..fd71156bfd74 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; |