From: Adrian Bunk <bunk@stusta.de>
To: bcrl@kvack.org
Cc: linux-aio@kvack.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] fs/aio.c: make some code static
Date: Thu, 21 Apr 2005 06:36:30 +0200 [thread overview]
Message-ID: <20050421043630.GC3828@stusta.de> (raw)
This patch makes some needlessly global code static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
fs/aio.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
--- linux-2.6.12-rc2-mm3-full/fs/aio.c.old 2005-04-20 23:03:19.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/fs/aio.c 2005-04-20 23:05:56.000000000 +0200
@@ -40,8 +40,8 @@
#define dprintk(x...) do { ; } while (0)
#endif
-long aio_run = 0; /* for testing only */
-long aio_wakeups = 0; /* for testing only */
+static long aio_run = 0; /* for testing only */
+static long aio_wakeups = 0; /* for testing only */
/*------ sysctl variables----*/
atomic_t aio_nr = ATOMIC_INIT(0); /* current system wide number of aio requests */
@@ -58,7 +58,7 @@
static DECLARE_WORK(fput_work, aio_fput_routine, NULL);
static DEFINE_SPINLOCK(fput_lock);
-LIST_HEAD(fput_head);
+static LIST_HEAD(fput_head);
static void aio_kick_handler(void *);
@@ -290,7 +290,7 @@
spin_unlock_irq(&ctx->ctx_lock);
}
-void wait_for_all_aios(struct kioctx *ctx)
+static void wait_for_all_aios(struct kioctx *ctx)
{
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
@@ -592,7 +592,7 @@
* Comments: Called with ctx->ctx_lock held. This nests
* task_lock instead ctx_lock.
*/
-void unuse_mm(struct mm_struct *mm)
+static void unuse_mm(struct mm_struct *mm)
{
struct task_struct *tsk = current;
@@ -879,7 +879,7 @@
* and if required activate the aio work queue to process
* it
*/
-void queue_kicked_iocb(struct kiocb *iocb)
+static void queue_kicked_iocb(struct kiocb *iocb)
{
struct kioctx *ctx = iocb->ki_ctx;
unsigned long flags;
@@ -1401,7 +1401,7 @@
* Performs the initial checks and aio retry method
* setup for the kiocb at the time of io submission.
*/
-ssize_t aio_setup_iocb(struct kiocb *kiocb)
+static ssize_t aio_setup_iocb(struct kiocb *kiocb)
{
struct file *file = kiocb->ki_filp;
ssize_t ret = 0;
@@ -1470,7 +1470,8 @@
* because this callback isn't used for wait queues which
* are nested inside ioctx lock (i.e. ctx->wait)
*/
-int aio_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key)
+static int aio_wake_function(wait_queue_t *wait, unsigned mode,
+ int sync, void *key)
{
struct kiocb *iocb = container_of(wait, struct kiocb, ki_wait);
@@ -1620,7 +1621,8 @@
* Finds a given iocb for cancellation.
* MUST be called with ctx->ctx_lock held.
*/
-struct kiocb *lookup_kiocb(struct kioctx *ctx, struct iocb __user *iocb, u32 key)
+static struct kiocb *lookup_kiocb(struct kioctx *ctx, struct iocb __user *iocb,
+ u32 key)
{
struct list_head *pos;
/* TODO: use a hash or array, this sucks. */
reply other threads:[~2005-04-21 4:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050421043630.GC3828@stusta.de \
--to=bunk@stusta.de \
--cc=bcrl@kvack.org \
--cc=linux-aio@kvack.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox