]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ksmbd: don't open-code file_path()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 31 Jan 2022 00:43:00 +0000 (19:43 -0500)
committerSteve French <stfrench@microsoft.com>
Wed, 5 Oct 2022 06:15:37 +0000 (01:15 -0500)
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>
fs/ksmbd/smb2pdu.c

index 19412ac701a65cbfcf25a9a0f1a1b8a234c54cb7..0f3fae17268b2900f29770beb876c5ec0bd5ac8f 100644 (file)
@@ -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;