aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/fid.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-01-12 04:01:17 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2017-01-12 04:01:17 -0500
commit7880b43bdfc9580700ee4568c75c383a5bcdd2ca (patch)
treebfad23571a8d05423c572d8eec2de131a2461377 /fs/9p/fid.c
parent7ce7d89f48834cefece7804d38fc5d85382edf77 (diff)
9p: constify ->d_name handling
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/fid.c')
-rw-r--r--fs/9p/fid.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index 60fb47469c86..ed4f8519b627 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -91,10 +91,10 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
91 * dentry names. 91 * dentry names.
92 */ 92 */
93static int build_path_from_dentry(struct v9fs_session_info *v9ses, 93static int build_path_from_dentry(struct v9fs_session_info *v9ses,
94 struct dentry *dentry, char ***names) 94 struct dentry *dentry, const unsigned char ***names)
95{ 95{
96 int n = 0, i; 96 int n = 0, i;
97 char **wnames; 97 const unsigned char **wnames;
98 struct dentry *ds; 98 struct dentry *ds;
99 99
100 for (ds = dentry; !IS_ROOT(ds); ds = ds->d_parent) 100 for (ds = dentry; !IS_ROOT(ds); ds = ds->d_parent)
@@ -105,7 +105,7 @@ static int build_path_from_dentry(struct v9fs_session_info *v9ses,
105 goto err_out; 105 goto err_out;
106 106
107 for (ds = dentry, i = (n-1); i >= 0; i--, ds = ds->d_parent) 107 for (ds = dentry, i = (n-1); i >= 0; i--, ds = ds->d_parent)
108 wnames[i] = (char *)ds->d_name.name; 108 wnames[i] = ds->d_name.name;
109 109
110 *names = wnames; 110 *names = wnames;
111 return n; 111 return n;
@@ -117,7 +117,7 @@ static struct p9_fid *v9fs_fid_lookup_with_uid(struct dentry *dentry,
117 kuid_t uid, int any) 117 kuid_t uid, int any)
118{ 118{
119 struct dentry *ds; 119 struct dentry *ds;
120 char **wnames, *uname; 120 const unsigned char **wnames, *uname;
121 int i, n, l, clone, access; 121 int i, n, l, clone, access;
122 struct v9fs_session_info *v9ses; 122 struct v9fs_session_info *v9ses;
123 struct p9_fid *fid, *old_fid = NULL; 123 struct p9_fid *fid, *old_fid = NULL;
@@ -137,7 +137,7 @@ static struct p9_fid *v9fs_fid_lookup_with_uid(struct dentry *dentry,
137 fid = v9fs_fid_find(ds, uid, any); 137 fid = v9fs_fid_find(ds, uid, any);
138 if (fid) { 138 if (fid) {
139 /* Found the parent fid do a lookup with that */ 139 /* Found the parent fid do a lookup with that */
140 fid = p9_client_walk(fid, 1, (char **)&dentry->d_name.name, 1); 140 fid = p9_client_walk(fid, 1, &dentry->d_name.name, 1);
141 goto fid_out; 141 goto fid_out;
142 } 142 }
143 up_read(&v9ses->rename_sem); 143 up_read(&v9ses->rename_sem);