mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
kern: Move variables only used for MAC under #ifdef MAC.
This commit is contained in:
parent
a56881d3e9
commit
36fb372264
2 changed files with 7 additions and 2 deletions
|
|
@ -1646,14 +1646,18 @@ pipe_free_kmem(struct pipe *cpipe)
|
|||
static void
|
||||
pipeclose(struct pipe *cpipe)
|
||||
{
|
||||
#ifdef MAC
|
||||
struct pipepair *pp;
|
||||
#endif
|
||||
struct pipe *ppipe;
|
||||
|
||||
KASSERT(cpipe != NULL, ("pipeclose: cpipe == NULL"));
|
||||
|
||||
PIPE_LOCK(cpipe);
|
||||
pipelock(cpipe, 0);
|
||||
#ifdef MAC
|
||||
pp = cpipe->pipe_pair;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If the other side is blocked, wake it up saying that
|
||||
|
|
|
|||
|
|
@ -597,7 +597,9 @@ soaio_process_job(struct socket *so, struct sockbuf *sb, struct kaiocb *job)
|
|||
{
|
||||
struct ucred *td_savedcred;
|
||||
struct thread *td;
|
||||
struct file *fp;
|
||||
#ifdef MAC
|
||||
struct file *fp = job->fd_file;
|
||||
#endif
|
||||
size_t cnt, done, job_total_nbytes __diagused;
|
||||
long ru_before;
|
||||
int error, flags;
|
||||
|
|
@ -605,7 +607,6 @@ soaio_process_job(struct socket *so, struct sockbuf *sb, struct kaiocb *job)
|
|||
SOCKBUF_UNLOCK(sb);
|
||||
aio_switch_vmspace(job);
|
||||
td = curthread;
|
||||
fp = job->fd_file;
|
||||
retry:
|
||||
td_savedcred = td->td_ucred;
|
||||
td->td_ucred = job->cred;
|
||||
|
|
|
|||
Loading…
Reference in a new issue