mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
In translate_path_major_minor(), do not calculate otherwise unused 'fp'
variable, avoiding an extra locking of the file descriptor array.
This commit is contained in:
parent
f0c4d27278
commit
b77ad8fc3b
1 changed files with 0 additions and 4 deletions
|
|
@ -118,7 +118,6 @@ translate_path_major_minor(struct thread *td, char *path, struct stat *buf)
|
|||
{
|
||||
struct proc *p = td->td_proc;
|
||||
struct filedesc *fdp = p->p_fd;
|
||||
struct file *fp;
|
||||
int fd;
|
||||
int temp;
|
||||
|
||||
|
|
@ -130,9 +129,6 @@ translate_path_major_minor(struct thread *td, char *path, struct stat *buf)
|
|||
fd = td->td_retval[0];
|
||||
td->td_retval[0] = temp;
|
||||
translate_fd_major_minor(td, fd, buf);
|
||||
FILEDESC_LOCK(fdp);
|
||||
fp = fdp->fd_ofiles[fd];
|
||||
FILEDESC_UNLOCK(fdp);
|
||||
fdclose(fdp, fdp->fd_ofiles[fd], fd, td);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue