aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-03-18 15:47:35 -0400
committerSteve French <stfrench@microsoft.com>2021-04-25 16:28:23 -0500
commit8e33cf20ceb7f6d7a7e039f9f82a0cd1f3a6f964 (patch)
treee72144e13f84a8f6ae89ad5b558ea39289aa7b03 /fs/cifs/dir.c
parentcifs: constify pathname arguments in a bunch of helpers (diff)
downloadlinux-dev-8e33cf20ceb7f6d7a7e039f9f82a0cd1f3a6f964.tar.xz
linux-dev-8e33cf20ceb7f6d7a7e039f9f82a0cd1f3a6f964.zip
cifs: make build_path_from_dentry() return const char *
... and adjust the callers. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r--fs/cifs/dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index a3fb81e0ba17..01e26f811885 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -78,7 +78,7 @@ cifs_build_path_to_root(struct smb3_fs_context *ctx, struct cifs_sb_info *cifs_s
}
/* Note: caller must free return buffer */
-char *
+const char *
build_path_from_dentry(struct dentry *direntry)
{
struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb);
@@ -233,7 +233,7 @@ cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned int xid,
int desired_access;
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct cifs_tcon *tcon = tlink_tcon(tlink);
- char *full_path = NULL;
+ const char *full_path = NULL;
FILE_ALL_INFO *buf = NULL;
struct inode *newinode = NULL;
int disposition;
@@ -619,7 +619,7 @@ int cifs_mknod(struct user_namespace *mnt_userns, struct inode *inode,
struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink;
struct cifs_tcon *tcon;
- char *full_path = NULL;
+ const char *full_path = NULL;
if (!old_valid_dev(device_number))
return -EINVAL;
@@ -660,7 +660,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
struct tcon_link *tlink;
struct cifs_tcon *pTcon;
struct inode *newInode = NULL;
- char *full_path = NULL;
+ const char *full_path = NULL;
xid = get_xid();