ksmbd: don't open-code file_path()
Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
4fe89d07dc
commit
2f5930c1d7
@ -5413,7 +5413,7 @@ static int smb2_rename(struct ksmbd_work *work,
|
||||
if (!pathname)
|
||||
return -ENOMEM;
|
||||
|
||||
abs_oldname = d_path(&fp->filp->f_path, pathname, PATH_MAX);
|
||||
abs_oldname = file_path(fp->filp, pathname, PATH_MAX);
|
||||
if (IS_ERR(abs_oldname)) {
|
||||
rc = -EINVAL;
|
||||
goto out;
|
||||
@ -5548,7 +5548,7 @@ static int smb2_create_link(struct ksmbd_work *work,
|
||||
}
|
||||
|
||||
ksmbd_debug(SMB, "link name is %s\n", link_name);
|
||||
target_name = d_path(&filp->f_path, pathname, PATH_MAX);
|
||||
target_name = file_path(filp, pathname, PATH_MAX);
|
||||
if (IS_ERR(target_name)) {
|
||||
rc = -EINVAL;
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user