mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 17:54:52 +00:00
Fix giant handling in pwrite(2), I forgot to release it when finishing
the syscall.
This commit is contained in:
parent
22539cefa1
commit
b5c93a560d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89435
|
@ -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 a new issue