From 5fb3b8e377deeb0ce362a7bcb9323542b579fdef Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 18 May 2009 13:30:16 +0200 Subject: 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. --- source3/smbd/aio.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'source3/smbd/aio.c') diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index 77616be48c..a5eea0a32e 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) )); @@ -277,10 +274,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) )); -- cgit