summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-05-18 13:30:16 +0200
committerKarolin Seeger <kseeger@samba.org>2009-05-26 09:39:34 +0200
commitb4999bd4b7ddc29cd61998a07ff2b7350b7c52ac (patch)
tree196c98d35e4dd604a3283a0b6eecf2f417d53a6f /source3/smbd
parent6b745771f71c615ecf33bf47c37ece88953a0fb9 (diff)
downloadsamba-b4999bd4b7ddc29cd61998a07ff2b7350b7c52ac.tar.gz
Move down the become_root()/unbecome_root() calls into the VFS modules
The aio_fork module does not need this, as it does not communicate via signals but with pipes. Watching a strace log with those become_root() calls in aio.c is absolutely awful, and it does affect performance. (cherry picked from commit b8d12d3ffce304b4086488d999f85d80667e196e)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/aio.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index cfa4b430ebf..fbfec46d705 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -179,10 +179,7 @@ bool schedule_aio_read_and_X(connection_struct *conn,
a->aio_sigevent.sigev_signo = RT_SIGNAL_AIO;
a->aio_sigevent.sigev_value.sival_int = req->mid;
- become_root();
ret = SMB_VFS_AIO_READ(fsp, a);
- unbecome_root();
-
if (ret == -1) {
DEBUG(0,("schedule_aio_read_and_X: aio_read failed. "
"Error %s\n", strerror(errno) ));
@@ -278,10 +275,7 @@ bool schedule_aio_write_and_X(connection_struct *conn,
a->aio_sigevent.sigev_signo = RT_SIGNAL_AIO;
a->aio_sigevent.sigev_value.sival_int = req->mid;
- become_root();
ret = SMB_VFS_AIO_WRITE(fsp, a);
- unbecome_root();
-
if (ret == -1) {
DEBUG(3,("schedule_aio_wrote_and_X: aio_write failed. "
"Error %s\n", strerror(errno) ));