summaryrefslogtreecommitdiff
path: root/fs/file_table.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-02-01 15:07:56 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2025-02-01 15:07:56 -0800
commita86bf2283d2c9769205407e2b54777c03d012939 (patch)
tree590ff51c17884f1f2c0da042c8febd8c1ce0780a /fs/file_table.c
parentc270ab5a87403f9365c00d3c587aa8000560bdc3 (diff)
parentc1feab95e0b2e9fce7e4f4b2739baf40d84543af (diff)
Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs cleanups from Al Viro: "Two unrelated patches - one is a removal of long-obsolete include in overlayfs (it used to need fs/internal.h, but the extern it wanted has been moved back to include/linux/namei.h) and another introduces convenience helper constructing struct qstr by a NUL-terminated string" * tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: add a string-to-qstr constructor fs/overlayfs/namei.c: get rid of include ../internal.h
Diffstat (limited to 'fs/file_table.c')
-rw-r--r--fs/file_table.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 7f7c378c6e31..f0291a66f9db 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -351,9 +351,7 @@ static struct file *alloc_file(const struct path *path, int flags,
static inline int alloc_path_pseudo(const char *name, struct inode *inode,
struct vfsmount *mnt, struct path *path)
{
- struct qstr this = QSTR_INIT(name, strlen(name));
-
- path->dentry = d_alloc_pseudo(mnt->mnt_sb, &this);
+ path->dentry = d_alloc_pseudo(mnt->mnt_sb, &QSTR(name));
if (!path->dentry)
return -ENOMEM;
path->mnt = mntget(mnt);