diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-10 18:09:36 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 08:34:50 -0400 |
commit | 312b63fba9e88a0dcf800834b8ede8716bcc1e17 (patch) | |
tree | a069e3b9ff142912fd09f09a22466707d31c6812 /fs/namei.c | |
parent | ebfc3b49a7ac25920cb5be5445f602e51d2ea559 (diff) |
don't pass nameidata * to vfs_create()
all we want is a boolean flag, same as the method gets now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/namei.c b/fs/namei.c index fd71156bfd74..ffcd4e114b6e 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2079,7 +2079,7 @@ void unlock_rename(struct dentry *p1, struct dentry *p2) | |||
2079 | } | 2079 | } |
2080 | 2080 | ||
2081 | int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 2081 | int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
2082 | struct nameidata *nd) | 2082 | bool want_excl) |
2083 | { | 2083 | { |
2084 | int error = may_create(dir, dentry); | 2084 | int error = may_create(dir, dentry); |
2085 | if (error) | 2085 | if (error) |
@@ -2092,7 +2092,7 @@ int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |||
2092 | error = security_inode_create(dir, dentry, mode); | 2092 | error = security_inode_create(dir, dentry, mode); |
2093 | if (error) | 2093 | if (error) |
2094 | return error; | 2094 | return error; |
2095 | error = dir->i_op->create(dir, dentry, mode, !nd || (nd->flags & LOOKUP_EXCL)); | 2095 | error = dir->i_op->create(dir, dentry, mode, want_excl); |
2096 | if (!error) | 2096 | if (!error) |
2097 | fsnotify_create(dir, dentry); | 2097 | fsnotify_create(dir, dentry); |
2098 | return error; | 2098 | return error; |
@@ -2396,7 +2396,8 @@ static int lookup_open(struct nameidata *nd, struct path *path, | |||
2396 | error = security_path_mknod(&nd->path, dentry, mode, 0); | 2396 | error = security_path_mknod(&nd->path, dentry, mode, 0); |
2397 | if (error) | 2397 | if (error) |
2398 | goto out_dput; | 2398 | goto out_dput; |
2399 | error = vfs_create(dir->d_inode, dentry, mode, nd); | 2399 | error = vfs_create(dir->d_inode, dentry, mode, |
2400 | nd->flags & LOOKUP_EXCL); | ||
2400 | if (error) | 2401 | if (error) |
2401 | goto out_dput; | 2402 | goto out_dput; |
2402 | } | 2403 | } |
@@ -2883,7 +2884,7 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, umode_t, mode, | |||
2883 | goto out_drop_write; | 2884 | goto out_drop_write; |
2884 | switch (mode & S_IFMT) { | 2885 | switch (mode & S_IFMT) { |
2885 | case 0: case S_IFREG: | 2886 | case 0: case S_IFREG: |
2886 | error = vfs_create(path.dentry->d_inode,dentry,mode,NULL); | 2887 | error = vfs_create(path.dentry->d_inode,dentry,mode,true); |
2887 | break; | 2888 | break; |
2888 | case S_IFCHR: case S_IFBLK: | 2889 | case S_IFCHR: case S_IFBLK: |
2889 | error = vfs_mknod(path.dentry->d_inode,dentry,mode, | 2890 | error = vfs_mknod(path.dentry->d_inode,dentry,mode, |