mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-27 01:11:31 +00:00
bpf...d_path(): constify path argument
Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
63dbfb077c
commit
1b8abbb121
3 changed files with 3 additions and 3 deletions
|
|
@ -79,7 +79,7 @@ __bpf_kfunc void bpf_put_file(struct file *file)
|
||||||
* pathname in *buf*, including the NUL termination character. On error, a
|
* pathname in *buf*, including the NUL termination character. On error, a
|
||||||
* negative integer is returned.
|
* negative integer is returned.
|
||||||
*/
|
*/
|
||||||
__bpf_kfunc int bpf_path_d_path(struct path *path, char *buf, size_t buf__sz)
|
__bpf_kfunc int bpf_path_d_path(const struct path *path, char *buf, size_t buf__sz)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
char *ret;
|
char *ret;
|
||||||
|
|
|
||||||
|
|
@ -900,7 +900,7 @@ const struct bpf_func_proto bpf_send_signal_thread_proto = {
|
||||||
.arg1_type = ARG_ANYTHING,
|
.arg1_type = ARG_ANYTHING,
|
||||||
};
|
};
|
||||||
|
|
||||||
BPF_CALL_3(bpf_d_path, struct path *, path, char *, buf, u32, sz)
|
BPF_CALL_3(bpf_d_path, const struct path *, path, char *, buf, u32, sz)
|
||||||
{
|
{
|
||||||
struct path copy;
|
struct path copy;
|
||||||
long len;
|
long len;
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ extern void bpf_put_file(struct file *file) __ksym;
|
||||||
* including the NULL termination character, stored in the supplied
|
* including the NULL termination character, stored in the supplied
|
||||||
* buffer. On error, a negative integer is returned.
|
* buffer. On error, a negative integer is returned.
|
||||||
*/
|
*/
|
||||||
extern int bpf_path_d_path(struct path *path, char *buf, size_t buf__sz) __ksym;
|
extern int bpf_path_d_path(const struct path *path, char *buf, size_t buf__sz) __ksym;
|
||||||
|
|
||||||
/* This macro must be used to mark the exception callback corresponding to the
|
/* This macro must be used to mark the exception callback corresponding to the
|
||||||
* main program. For example:
|
* main program. For example:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue