Fix giant handling in pwrite(2), I forgot to release it when finishing
the syscall.
This commit is contained in:
parent
22539cefa1
commit
b5c93a560d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user