diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-04-25 11:18:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-25 11:18:14 -0400 |
commit | 25ee7e3832951cf5896b194f6cd929a44863f419 (patch) | |
tree | 5b6486ded5188e41ac9bc81ad4a5e2bd746f7ede | |
parent | 056de2fa12febe02597f971eb6ea8f2cc9c9b06e (diff) |
[PATCH] fs/aio.c: make some code static
This patch makes some needlessly global code static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/aio.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -40,8 +40,8 @@ | |||
40 | #define dprintk(x...) do { ; } while (0) | 40 | #define dprintk(x...) do { ; } while (0) |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | long aio_run = 0; /* for testing only */ | 43 | static long aio_run = 0; /* for testing only */ |
44 | long aio_wakeups = 0; /* for testing only */ | 44 | static long aio_wakeups = 0; /* for testing only */ |
45 | 45 | ||
46 | /*------ sysctl variables----*/ | 46 | /*------ sysctl variables----*/ |
47 | atomic_t aio_nr = ATOMIC_INIT(0); /* current system wide number of aio requests */ | 47 | atomic_t aio_nr = ATOMIC_INIT(0); /* current system wide number of aio requests */ |
@@ -58,7 +58,7 @@ static void aio_fput_routine(void *); | |||
58 | static DECLARE_WORK(fput_work, aio_fput_routine, NULL); | 58 | static DECLARE_WORK(fput_work, aio_fput_routine, NULL); |
59 | 59 | ||
60 | static DEFINE_SPINLOCK(fput_lock); | 60 | static DEFINE_SPINLOCK(fput_lock); |
61 | LIST_HEAD(fput_head); | 61 | static LIST_HEAD(fput_head); |
62 | 62 | ||
63 | static void aio_kick_handler(void *); | 63 | static void aio_kick_handler(void *); |
64 | 64 | ||
@@ -290,7 +290,7 @@ static void aio_cancel_all(struct kioctx *ctx) | |||
290 | spin_unlock_irq(&ctx->ctx_lock); | 290 | spin_unlock_irq(&ctx->ctx_lock); |
291 | } | 291 | } |
292 | 292 | ||
293 | void wait_for_all_aios(struct kioctx *ctx) | 293 | static void wait_for_all_aios(struct kioctx *ctx) |
294 | { | 294 | { |
295 | struct task_struct *tsk = current; | 295 | struct task_struct *tsk = current; |
296 | DECLARE_WAITQUEUE(wait, tsk); | 296 | DECLARE_WAITQUEUE(wait, tsk); |
@@ -592,7 +592,7 @@ static void use_mm(struct mm_struct *mm) | |||
592 | * Comments: Called with ctx->ctx_lock held. This nests | 592 | * Comments: Called with ctx->ctx_lock held. This nests |
593 | * task_lock instead ctx_lock. | 593 | * task_lock instead ctx_lock. |
594 | */ | 594 | */ |
595 | void unuse_mm(struct mm_struct *mm) | 595 | static void unuse_mm(struct mm_struct *mm) |
596 | { | 596 | { |
597 | struct task_struct *tsk = current; | 597 | struct task_struct *tsk = current; |
598 | 598 | ||
@@ -879,7 +879,7 @@ static void aio_kick_handler(void *data) | |||
879 | * and if required activate the aio work queue to process | 879 | * and if required activate the aio work queue to process |
880 | * it | 880 | * it |
881 | */ | 881 | */ |
882 | void queue_kicked_iocb(struct kiocb *iocb) | 882 | static void queue_kicked_iocb(struct kiocb *iocb) |
883 | { | 883 | { |
884 | struct kioctx *ctx = iocb->ki_ctx; | 884 | struct kioctx *ctx = iocb->ki_ctx; |
885 | unsigned long flags; | 885 | unsigned long flags; |
@@ -1401,7 +1401,7 @@ static ssize_t aio_fsync(struct kiocb *iocb) | |||
1401 | * Performs the initial checks and aio retry method | 1401 | * Performs the initial checks and aio retry method |
1402 | * setup for the kiocb at the time of io submission. | 1402 | * setup for the kiocb at the time of io submission. |
1403 | */ | 1403 | */ |
1404 | ssize_t aio_setup_iocb(struct kiocb *kiocb) | 1404 | static ssize_t aio_setup_iocb(struct kiocb *kiocb) |
1405 | { | 1405 | { |
1406 | struct file *file = kiocb->ki_filp; | 1406 | struct file *file = kiocb->ki_filp; |
1407 | ssize_t ret = 0; | 1407 | ssize_t ret = 0; |
@@ -1470,7 +1470,8 @@ ssize_t aio_setup_iocb(struct kiocb *kiocb) | |||
1470 | * because this callback isn't used for wait queues which | 1470 | * because this callback isn't used for wait queues which |
1471 | * are nested inside ioctx lock (i.e. ctx->wait) | 1471 | * are nested inside ioctx lock (i.e. ctx->wait) |
1472 | */ | 1472 | */ |
1473 | int aio_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key) | 1473 | static int aio_wake_function(wait_queue_t *wait, unsigned mode, |
1474 | int sync, void *key) | ||
1474 | { | 1475 | { |
1475 | struct kiocb *iocb = container_of(wait, struct kiocb, ki_wait); | 1476 | struct kiocb *iocb = container_of(wait, struct kiocb, ki_wait); |
1476 | 1477 | ||
@@ -1620,7 +1621,8 @@ asmlinkage long sys_io_submit(aio_context_t ctx_id, long nr, | |||
1620 | * Finds a given iocb for cancellation. | 1621 | * Finds a given iocb for cancellation. |
1621 | * MUST be called with ctx->ctx_lock held. | 1622 | * MUST be called with ctx->ctx_lock held. |
1622 | */ | 1623 | */ |
1623 | struct kiocb *lookup_kiocb(struct kioctx *ctx, struct iocb __user *iocb, u32 key) | 1624 | static struct kiocb *lookup_kiocb(struct kioctx *ctx, struct iocb __user *iocb, |
1625 | u32 key) | ||
1624 | { | 1626 | { |
1625 | struct list_head *pos; | 1627 | struct list_head *pos; |
1626 | /* TODO: use a hash or array, this sucks. */ | 1628 | /* TODO: use a hash or array, this sucks. */ |