diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-03-06 07:39:12 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-03-06 07:39:12 +0000 |
commit | fe063bb84d1657ff868f2c2ec73a39f9b18590f0 (patch) | |
tree | 90f5067705f2b0131957316dfb0588efe7c6a755 /sys/compat | |
parent | 701d8d714e23bcdba0d08bd92fe8b2a7a142129b (diff) | |
download | FreeBSD-src-fe063bb84d1657ff868f2c2ec73a39f9b18590f0.zip FreeBSD-src-fe063bb84d1657ff868f2c2ec73a39f9b18590f0.tar.gz |
In translate_path_major_minor(), do not calculate otherwise unused 'fp'
variable, avoiding an extra locking of the file descriptor array.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_stats.c | 4 |
1 files changed, 0 insertions, 4 deletions
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); } |