Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a2bbe664
Commit
a2bbe664
authored
Jul 07, 2019
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
constify dentry argument of dentry_path()/dentry_path_raw()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
a38fd874
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
fs/d_path.c
fs/d_path.c
+5
-5
include/linux/dcache.h
include/linux/dcache.h
+2
-2
No files found.
fs/d_path.c
View file @
a2bbe664
...
...
@@ -326,9 +326,9 @@ char *simple_dname(struct dentry *dentry, char *buffer, int buflen)
/*
* Write full pathname from the root of the filesystem into the buffer.
*/
static
char
*
__dentry_path
(
struct
dentry
*
d
,
char
*
buf
,
int
buflen
)
static
char
*
__dentry_path
(
const
struct
dentry
*
d
,
char
*
buf
,
int
buflen
)
{
struct
dentry
*
dentry
;
const
struct
dentry
*
dentry
;
char
*
end
,
*
retval
;
int
len
,
seq
=
0
;
int
error
=
0
;
...
...
@@ -347,7 +347,7 @@ static char *__dentry_path(struct dentry *d, char *buf, int buflen)
*
retval
=
'/'
;
read_seqbegin_or_lock
(
&
rename_lock
,
&
seq
);
while
(
!
IS_ROOT
(
dentry
))
{
struct
dentry
*
parent
=
dentry
->
d_parent
;
const
struct
dentry
*
parent
=
dentry
->
d_parent
;
prefetch
(
parent
);
error
=
prepend_name
(
&
end
,
&
len
,
&
dentry
->
d_name
);
...
...
@@ -371,13 +371,13 @@ static char *__dentry_path(struct dentry *d, char *buf, int buflen)
return
ERR_PTR
(
-
ENAMETOOLONG
);
}
char
*
dentry_path_raw
(
struct
dentry
*
dentry
,
char
*
buf
,
int
buflen
)
char
*
dentry_path_raw
(
const
struct
dentry
*
dentry
,
char
*
buf
,
int
buflen
)
{
return
__dentry_path
(
dentry
,
buf
,
buflen
);
}
EXPORT_SYMBOL
(
dentry_path_raw
);
char
*
dentry_path
(
struct
dentry
*
dentry
,
char
*
buf
,
int
buflen
)
char
*
dentry_path
(
const
struct
dentry
*
dentry
,
char
*
buf
,
int
buflen
)
{
char
*
p
=
NULL
;
char
*
retval
;
...
...
include/linux/dcache.h
View file @
a2bbe664
...
...
@@ -300,8 +300,8 @@ char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
extern
char
*
__d_path
(
const
struct
path
*
,
const
struct
path
*
,
char
*
,
int
);
extern
char
*
d_absolute_path
(
const
struct
path
*
,
char
*
,
int
);
extern
char
*
d_path
(
const
struct
path
*
,
char
*
,
int
);
extern
char
*
dentry_path_raw
(
struct
dentry
*
,
char
*
,
int
);
extern
char
*
dentry_path
(
struct
dentry
*
,
char
*
,
int
);
extern
char
*
dentry_path_raw
(
const
struct
dentry
*
,
char
*
,
int
);
extern
char
*
dentry_path
(
const
struct
dentry
*
,
char
*
,
int
);
/* Allocation counts.. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment