From fe063bb84d1657ff868f2c2ec73a39f9b18590f0 Mon Sep 17 00:00:00 2001 From: rwatson Date: Tue, 6 Mar 2007 07:39:12 +0000 Subject: In translate_path_major_minor(), do not calculate otherwise unused 'fp' variable, avoiding an extra locking of the file descriptor array. --- sys/compat/linux/linux_stats.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sys/compat/linux/linux_stats.c') diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 84feced..962c2f0 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -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); } -- cgit v1.1