mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
VFS: Provide empty name qstr
Provide an empty name (ie. "") qstr for general use. Signed-off-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
ee416bcdba
commit
cdf01226b2
6 changed files with 15 additions and 10 deletions
|
|
@ -3400,7 +3400,6 @@ out:
|
|||
|
||||
struct dentry *vfs_tmpfile(struct dentry *dentry, umode_t mode, int open_flag)
|
||||
{
|
||||
static const struct qstr name = QSTR_INIT("/", 1);
|
||||
struct dentry *child = NULL;
|
||||
struct inode *dir = dentry->d_inode;
|
||||
struct inode *inode;
|
||||
|
|
@ -3414,7 +3413,7 @@ struct dentry *vfs_tmpfile(struct dentry *dentry, umode_t mode, int open_flag)
|
|||
if (!dir->i_op->tmpfile)
|
||||
goto out_err;
|
||||
error = -ENOMEM;
|
||||
child = d_alloc(dentry, &name);
|
||||
child = d_alloc(dentry, &slash_name);
|
||||
if (unlikely(!child))
|
||||
goto out_err;
|
||||
error = dir->i_op->tmpfile(dir, child, mode);
|
||||
|
|
|
|||
Loading…
Reference in a new issue