Unconditionally lock Giant in do_sendfile(), rather than locking it

conditional on debug.mpsafenet.  We can try pushing down Giant here
later, but we don't want to enter VFS without holding Giant.

Bumped into by:	kris
This commit is contained in:
Robert Watson 2004-05-08 02:24:21 +00:00
parent e075483771
commit f7250466a8

View file

@ -1705,7 +1705,7 @@ do_sendfile(struct thread *td, struct sendfile_args *uap, int compat)
int error, s, headersize = 0, headersent = 0;
struct iovec *hdr_iov = NULL;
NET_LOCK_GIANT();
mtx_lock(&Giant);
hdtr_size = 0;
@ -2070,7 +2070,7 @@ done:
if (m_header)
m_freem(m_header);
NET_UNLOCK_GIANT();
mtx_unlock(&Giant);
if (error == ERESTART)
error = EINTR;