Fix giant handling in pwrite(2), I forgot to release it when finishing

the syscall.
This commit is contained in:
Alfred Perlstein 2002-01-16 21:33:41 +00:00
parent 22539cefa1
commit b5c93a560d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89435

View File

@ -394,11 +394,12 @@ pwrite(td, uap)
struct file *fp;
int error;
mtx_lock(&Giant);
if ((error = fget_write(td, uap->fd, &fp)) == 0) {
if (fp->f_type == DTYPE_VNODE) {
mtx_lock(&Giant);
error = dofilewrite(td, fp, uap->fd, uap->buf,
uap->nbyte, uap->offset, FOF_OFFSET);
mtx_unlock(&Giant);
} else {
error = ESPIPE;
}