Skip to content

Commit 39537a3

Browse files
author
Al Viro
committed
ksmbd: use CLASS(filename_kernel)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent abb0434 commit 39537a3

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

fs/smb/server/vfs.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ static int ksmbd_vfs_path_lookup(struct ksmbd_share_config *share_conf,
5454
struct path *path, bool for_remove)
5555
{
5656
struct qstr last;
57-
struct filename *filename __free(putname) = NULL;
5857
const struct path *root_share_path = &share_conf->vfs_path;
5958
int err, type;
6059
struct dentry *d;
@@ -66,7 +65,7 @@ static int ksmbd_vfs_path_lookup(struct ksmbd_share_config *share_conf,
6665
flags |= LOOKUP_BENEATH;
6766
}
6867

69-
filename = getname_kernel(pathname);
68+
CLASS(filename_kernel, filename)(pathname);
7069
err = vfs_path_parent_lookup(filename, flags,
7170
path, &last, &type,
7271
root_share_path);
@@ -664,7 +663,6 @@ int ksmbd_vfs_rename(struct ksmbd_work *work, const struct path *old_path,
664663
struct path new_path;
665664
struct qstr new_last;
666665
struct renamedata rd;
667-
struct filename *to;
668666
struct ksmbd_share_config *share_conf = work->tcon->share_conf;
669667
struct ksmbd_file *parent_fp;
670668
int new_type;
@@ -673,7 +671,7 @@ int ksmbd_vfs_rename(struct ksmbd_work *work, const struct path *old_path,
673671
if (ksmbd_override_fsids(work))
674672
return -ENOMEM;
675673

676-
to = getname_kernel(newname);
674+
CLASS(filename_kernel, to)(newname);
677675

678676
retry:
679677
err = vfs_path_parent_lookup(to, lookup_flags | LOOKUP_BENEATH,
@@ -732,7 +730,6 @@ int ksmbd_vfs_rename(struct ksmbd_work *work, const struct path *old_path,
732730
goto retry;
733731
}
734732
out1:
735-
putname(to);
736733
ksmbd_revert_fsids(work);
737734
return err;
738735
}

0 commit comments

Comments
 (0)