vfs: drop the always curthread argument from kern_alternate_path

This commit is contained in:
Mateusz Guzik 2021-11-25 21:42:42 +00:00
parent af4051d250
commit c40fee6f7d
3 changed files with 6 additions and 4 deletions

View File

@ -95,7 +95,7 @@ linux_emul_convpath(const char *path, enum uio_seg pathseg,
{
int retval;
retval = kern_alternate_path(curthread, linux_emul_path, path, pathseg, pbuf,
retval = kern_alternate_path(linux_emul_path, path, pathseg, pbuf,
cflag, dfd);
return (retval);

View File

@ -1673,14 +1673,16 @@ NDVALIDATE(struct nameidata *ndp)
* the M_TEMP bucket if one is returned.
*/
int
kern_alternate_path(struct thread *td, const char *prefix, const char *path,
enum uio_seg pathseg, char **pathbuf, int create, int dirfd)
kern_alternate_path(const char *prefix, const char *path, enum uio_seg pathseg,
char **pathbuf, int create, int dirfd)
{
struct thread *td;
struct nameidata nd, ndroot;
char *ptr, *buf, *cp;
size_t len, sz;
int error;
td = curthread;
buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
*pathbuf = buf;

View File

@ -91,7 +91,7 @@ int kern_accessat(struct thread *td, int fd, const char *path,
enum uio_seg pathseg, int flags, int mode);
int kern_adjtime(struct thread *td, struct timeval *delta,
struct timeval *olddelta);
int kern_alternate_path(struct thread *td, const char *prefix, const char *path,
int kern_alternate_path(const char *prefix, const char *path,
enum uio_seg pathseg, char **pathbuf, int create, int dirfd);
int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa);
int kern_break(struct thread *td, uintptr_t *addr);