@@ -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
678676retry :
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 }
734732out1 :
735- putname (to );
736733 ksmbd_revert_fsids (work );
737734 return err ;
738735}
0 commit comments