lkml.org 
[lkml]   [2017]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2/5] aio: Export aio_nr_lock and aio_max_nr initial value to include/linux/aio.h
From
Date
Next patch will use the values in more files, so let's make them visible external.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
fs/aio.c | 4 ++--
include/linux/aio.h | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index 04209c0561b2..9dc98a29077c 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -188,10 +188,10 @@ struct aio_kiocb {
struct eventfd_ctx *ki_eventfd;
};

+DEFINE_SPINLOCK(aio_nr_lock);
/*------ sysctl variables----*/
-static DEFINE_SPINLOCK(aio_nr_lock);
unsigned long aio_nr; /* current system wide number of aio requests */
-unsigned long aio_max_nr = 0x10000; /* system wide maximum number of aio requests */
+unsigned long aio_max_nr = AIO_NR_DEF; /* system wide maximum number of aio requests */
/*----end sysctl variables---*/

static struct kmem_cache *kiocb_cachep;
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 9d8aabecfe2d..5dda2663802f 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -10,6 +10,10 @@ struct mm_struct;

#define KIOCB_KEY 0

+#define AIO_NR_INF (-1UL)
+#define AIO_NR_DEF 0x10000
+
+extern spinlock_t aio_nr_lock;
typedef int (kiocb_cancel_fn)(struct kiocb *);

/* prototypes */
\
 
 \ /
  Last update: 2017-12-04 17:15    [W:0.105 / U:0.108 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site