Skip to content

Commit 7546a2c

Browse files
Rtoaxqmonnet
authored andcommitted
bpf: Finish constification of 1st parameter of bpf_d_path()
The commit 1b8abbb12128 ("bpf...d_path(): constify path argument") constified the first parameter of the bpf_d_path(), but failed to update it in all places. Finish constification. Otherwise the selftest fail to build: .../selftests/bpf/bpf_experimental.h:222:12: error: conflicting types for 'bpf_path_d_path' 222 | extern int bpf_path_d_path(const struct path *path, char *buf, size_t buf__sz) __ksym; | ^ .../selftests/bpf/tools/include/vmlinux.h:153922:12: note: previous declaration is here 153922 | extern int bpf_path_d_path(struct path *path, char *buf, size_t buf__sz) __weak __ksym; Fixes: 1b8abbb12128 ("bpf...d_path(): constify path argument") Signed-off-by: Rong Tao <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 5111965 commit 7546a2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/uapi/linux/bpf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4891,7 +4891,7 @@ union bpf_attr {
48914891
*
48924892
* **-ENOENT** if the bpf_local_storage cannot be found.
48934893
*
4894-
* long bpf_d_path(struct path *path, char *buf, u32 sz)
4894+
* long bpf_d_path(const struct path *path, char *buf, u32 sz)
48954895
* Description
48964896
* Return full path for given **struct path** object, which
48974897
* needs to be the kernel BTF *path* object. The path is

0 commit comments

Comments
 (0)