aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-05-12 18:44:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-05-15 01:10:43 -0400
commit76ae2a5ab13c4413dd403c940c16bd0b1e609346 (patch)
tree8e8c11b00413d9b33d6e8f0a5f8d6de89a759a19 /fs/namei.c
parentc8a53ee5ee4fcab5ee252f61a69609b65e5e74b8 (diff)
namei: trim do_last() arguments
now that struct filename is stashed in nameidata we have no need to pass it in Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 970456fc9ea8..8d453041a323 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2992,7 +2992,7 @@ out_dput:
2992 */ 2992 */
2993static int do_last(struct nameidata *nd, 2993static int do_last(struct nameidata *nd,
2994 struct file *file, const struct open_flags *op, 2994 struct file *file, const struct open_flags *op,
2995 int *opened, struct filename *name) 2995 int *opened)
2996{ 2996{
2997 struct dentry *dir = nd->path.dentry; 2997 struct dentry *dir = nd->path.dentry;
2998 int open_flag = op->open_flag; 2998 int open_flag = op->open_flag;
@@ -3039,7 +3039,7 @@ static int do_last(struct nameidata *nd,
3039 if (error) 3039 if (error)
3040 return error; 3040 return error;
3041 3041
3042 audit_inode(name, dir, LOOKUP_PARENT); 3042 audit_inode(nd->name, dir, LOOKUP_PARENT);
3043 /* trailing slashes? */ 3043 /* trailing slashes? */
3044 if (unlikely(nd->last.name[nd->last.len])) 3044 if (unlikely(nd->last.name[nd->last.len]))
3045 return -EISDIR; 3045 return -EISDIR;
@@ -3068,7 +3068,7 @@ retry_lookup:
3068 !S_ISREG(file_inode(file)->i_mode)) 3068 !S_ISREG(file_inode(file)->i_mode))
3069 will_truncate = false; 3069 will_truncate = false;
3070 3070
3071 audit_inode(name, file->f_path.dentry, 0); 3071 audit_inode(nd->name, file->f_path.dentry, 0);
3072 goto opened; 3072 goto opened;
3073 } 3073 }
3074 3074
@@ -3085,7 +3085,7 @@ retry_lookup:
3085 * create/update audit record if it already exists. 3085 * create/update audit record if it already exists.
3086 */ 3086 */
3087 if (d_is_positive(path.dentry)) 3087 if (d_is_positive(path.dentry))
3088 audit_inode(name, path.dentry, 0); 3088 audit_inode(nd->name, path.dentry, 0);
3089 3089
3090 /* 3090 /*
3091 * If atomic_open() acquired write access it is dropped now due to 3091 * If atomic_open() acquired write access it is dropped now due to
@@ -3143,7 +3143,7 @@ finish_open:
3143 path_put(&save_parent); 3143 path_put(&save_parent);
3144 return error; 3144 return error;
3145 } 3145 }
3146 audit_inode(name, nd->path.dentry, 0); 3146 audit_inode(nd->name, nd->path.dentry, 0);
3147 error = -EISDIR; 3147 error = -EISDIR;
3148 if ((open_flag & O_CREAT) && d_is_dir(nd->path.dentry)) 3148 if ((open_flag & O_CREAT) && d_is_dir(nd->path.dentry))
3149 goto out; 3149 goto out;
@@ -3298,7 +3298,7 @@ static struct file *path_openat(struct nameidata *nd,
3298 return ERR_CAST(s); 3298 return ERR_CAST(s);
3299 } 3299 }
3300 while (!(error = link_path_walk(s, nd)) && 3300 while (!(error = link_path_walk(s, nd)) &&
3301 (error = do_last(nd, file, op, &opened, nd->name)) > 0) { 3301 (error = do_last(nd, file, op, &opened)) > 0) {
3302 nd->flags &= ~(LOOKUP_OPEN|LOOKUP_CREATE|LOOKUP_EXCL); 3302 nd->flags &= ~(LOOKUP_OPEN|LOOKUP_CREATE|LOOKUP_EXCL);
3303 s = trailing_symlink(nd); 3303 s = trailing_symlink(nd);
3304 if (IS_ERR(s)) { 3304 if (IS_ERR(s)) {