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:
Robert Watson 2007-03-06 07:39:12 +00:00
parent f0c4d27278
commit b77ad8fc3b

View file

@ -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);
}