aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-07-04 12:25:22 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-07-06 03:27:09 -0400
commitcdf01226b26e98c79c13b335fbe0cbbbe850cf44 (patch)
tree979318b9a3b69b03b39f6e66d3ffa75b82565ddc /fs/namei.c
parentee416bcdba9975065de571e09de1f7ebfde2156a (diff)
VFS: Provide empty name qstr
Provide an empty name (ie. "") qstr for general use. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 6571a5f5112e..0d35760fee00 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3400,7 +3400,6 @@ out:
3400 3400
3401struct dentry *vfs_tmpfile(struct dentry *dentry, umode_t mode, int open_flag) 3401struct dentry *vfs_tmpfile(struct dentry *dentry, umode_t mode, int open_flag)
3402{ 3402{
3403 static const struct qstr name = QSTR_INIT("/", 1);
3404 struct dentry *child = NULL; 3403 struct dentry *child = NULL;
3405 struct inode *dir = dentry->d_inode; 3404 struct inode *dir = dentry->d_inode;
3406 struct inode *inode; 3405 struct inode *inode;
@@ -3414,7 +3413,7 @@ struct dentry *vfs_tmpfile(struct dentry *dentry, umode_t mode, int open_flag)
3414 if (!dir->i_op->tmpfile) 3413 if (!dir->i_op->tmpfile)
3415 goto out_err; 3414 goto out_err;
3416 error = -ENOMEM; 3415 error = -ENOMEM;
3417 child = d_alloc(dentry, &name); 3416 child = d_alloc(dentry, &slash_name);
3418 if (unlikely(!child)) 3417 if (unlikely(!child))
3419 goto out_err; 3418 goto out_err;
3420 error = dir->i_op->tmpfile(dir, child, mode); 3419 error = dir->i_op->tmpfile(dir, child, mode);