Commit a95164d9 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Al Viro

[patch 3/4] vfs: remove unused nameidata argument of may_create()

Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7ee7c12b
...@@ -1431,8 +1431,7 @@ static int may_delete(struct inode *dir,struct dentry *victim,int isdir) ...@@ -1431,8 +1431,7 @@ static int may_delete(struct inode *dir,struct dentry *victim,int isdir)
* 3. We should have write and exec permissions on dir * 3. We should have write and exec permissions on dir
* 4. We can't do it if dir is immutable (done in permission()) * 4. We can't do it if dir is immutable (done in permission())
*/ */
static inline int may_create(struct inode *dir, struct dentry *child, static inline int may_create(struct inode *dir, struct dentry *child)
struct nameidata *nd)
{ {
if (child->d_inode) if (child->d_inode)
return -EEXIST; return -EEXIST;
...@@ -1504,7 +1503,7 @@ void unlock_rename(struct dentry *p1, struct dentry *p2) ...@@ -1504,7 +1503,7 @@ void unlock_rename(struct dentry *p1, struct dentry *p2)
int vfs_create(struct inode *dir, struct dentry *dentry, int mode, int vfs_create(struct inode *dir, struct dentry *dentry, int mode,
struct nameidata *nd) struct nameidata *nd)
{ {
int error = may_create(dir, dentry, nd); int error = may_create(dir, dentry);
if (error) if (error)
return error; return error;
...@@ -1948,7 +1947,7 @@ EXPORT_SYMBOL_GPL(lookup_create); ...@@ -1948,7 +1947,7 @@ EXPORT_SYMBOL_GPL(lookup_create);
int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
{ {
int error = may_create(dir, dentry, NULL); int error = may_create(dir, dentry);
if (error) if (error)
return error; return error;
...@@ -2049,7 +2048,7 @@ asmlinkage long sys_mknod(const char __user *filename, int mode, unsigned dev) ...@@ -2049,7 +2048,7 @@ asmlinkage long sys_mknod(const char __user *filename, int mode, unsigned dev)
int vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) int vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
{ {
int error = may_create(dir, dentry, NULL); int error = may_create(dir, dentry);
if (error) if (error)
return error; return error;
...@@ -2316,7 +2315,7 @@ asmlinkage long sys_unlink(const char __user *pathname) ...@@ -2316,7 +2315,7 @@ asmlinkage long sys_unlink(const char __user *pathname)
int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname) int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname)
{ {
int error = may_create(dir, dentry, NULL); int error = may_create(dir, dentry);
if (error) if (error)
return error; return error;
...@@ -2386,7 +2385,7 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de ...@@ -2386,7 +2385,7 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de
if (!inode) if (!inode)
return -ENOENT; return -ENOENT;
error = may_create(dir, new_dentry, NULL); error = may_create(dir, new_dentry);
if (error) if (error)
return error; return error;
...@@ -2595,7 +2594,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -2595,7 +2594,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
return error; return error;
if (!new_dentry->d_inode) if (!new_dentry->d_inode)
error = may_create(new_dir, new_dentry, NULL); error = may_create(new_dir, new_dentry);
else else
error = may_delete(new_dir, new_dentry, is_dir); error = may_delete(new_dir, new_dentry, is_dir);
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment