Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9683da91e2db323ee728041576e29ad7fa9547b9
Commit:     9683da91e2db323ee728041576e29ad7fa9547b9
Parent:     6c59e2f593d0c00c78ec48146de6eaf52a342dd5
Author:     Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 10 01:44:27 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Feb 11 10:51:24 2007 -0800

    [PATCH] uml: AIO locking and tidying
    
    Comment the lack of locking of data that's set up once at boot time.
    
    Also fixed a couple of bogus printks.
    
    Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
    Cc: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/os-Linux/aio.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index f897140..6ff1274 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -24,9 +24,6 @@ struct aio_thread_req {
        struct aio_context *aio;
 };
 
-static int aio_req_fd_r = -1;
-static int aio_req_fd_w = -1;
-
 #if defined(HAVE_AIO_ABI)
 #include <linux/aio_abi.h>
 
@@ -111,6 +108,7 @@ static int do_aio(aio_context_t ctx, enum aio_type type, 
int fd, char *buf,
        return err;
 }
 
+/* Initialized in an initcall and unchanged thereafter */
 static aio_context_t ctx = 0;
 
 static int aio_thread(void *arg)
@@ -137,7 +135,7 @@ static int aio_thread(void *arg)
                        err = os_write_file(reply_fd, &reply, sizeof(reply));
                        if(err != sizeof(reply))
                                printk("aio_thread - write failed, fd = %d, "
-                                      "err = %d\n", aio_req_fd_r, -err);
+                                      "err = %d\n", reply_fd, -err);
                }
        }
        return 0;
@@ -182,6 +180,11 @@ out:
        return err;
 }
 
+/* These are initialized in initcalls and not changed */
+static int aio_req_fd_r = -1;
+static int aio_req_fd_w = -1;
+static int aio_pid = -1;
+
 static int not_aio_thread(void *arg)
 {
        struct aio_thread_req req;
@@ -208,14 +211,12 @@ static int not_aio_thread(void *arg)
                err = os_write_file(req.aio->reply_fd, &reply, sizeof(reply));
                if(err != sizeof(reply))
                        printk("not_aio_thread - write failed, fd = %d, "
-                              "err = %d\n", aio_req_fd_r, -err);
+                              "err = %d\n", req.aio->reply_fd, -err);
        }
 
        return 0;
 }
 
-static int aio_pid = -1;
-
 static int init_aio_24(void)
 {
        unsigned long stack;
@@ -308,6 +309,7 @@ static int submit_aio_26(enum aio_type type, int io_fd, 
char *buf, int len,
 }
 #endif
 
+/* Initialized in an initcall and unchanged thereafter */
 static int aio_24 = DEFAULT_24_AIO;
 
 static int __init set_aio_24(char *name, int *add)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to