summaryrefslogtreecommitdiff
path: root/ipc/mq_sysctl.c
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2014-04-10 01:49:29 +0400
committerChris Zankel <chris@zankel.net>2014-04-10 01:49:29 +0400
commite86c4b67feb2c984314eef71314f26cfe39fef36 (patch)
tree3c5a7e2216cdcd1d06b8729bf94eba6dc74a7959 /ipc/mq_sysctl.c
parentb3fdfc1b4b641d372e35ced98814289bc60bc5d1 (diff)
parent9c602629e34bad88a464e08de08118e80beee0d8 (diff)
downloadlinux-e86c4b67feb2c984314eef71314f26cfe39fef36.tar.xz
Merge tag 'xtensa-for-next-20140406' of git://github.com/jcmvbkbc/linux-xtensa into for_next
Merging from Max' tree. Xtensa fixes for 3.15: - add missing cache manipulation symbol exports to fix build failures; - sort extable at build time; - clean up sysmem code, support memmap boot parameter; - add highmem support for cores with non-aliasing caches; - add DTS for xtfpga on KC705. Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'ipc/mq_sysctl.c')
-rw-r--r--ipc/mq_sysctl.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c
index 383d638340b8..5bb8bfe67149 100644
--- a/ipc/mq_sysctl.c
+++ b/ipc/mq_sysctl.c
@@ -22,6 +22,16 @@ static void *get_mq(ctl_table *table)
return which;
}
+static int proc_mq_dointvec(ctl_table *table, int write,
+ void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+ struct ctl_table mq_table;
+ memcpy(&mq_table, table, sizeof(mq_table));
+ mq_table.data = get_mq(table);
+
+ return proc_dointvec(&mq_table, write, buffer, lenp, ppos);
+}
+
static int proc_mq_dointvec_minmax(ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
@@ -33,12 +43,10 @@ static int proc_mq_dointvec_minmax(ctl_table *table, int write,
lenp, ppos);
}
#else
+#define proc_mq_dointvec NULL
#define proc_mq_dointvec_minmax NULL
#endif
-static int msg_queues_limit_min = MIN_QUEUESMAX;
-static int msg_queues_limit_max = HARD_QUEUESMAX;
-
static int msg_max_limit_min = MIN_MSGMAX;
static int msg_max_limit_max = HARD_MSGMAX;
@@ -51,9 +59,7 @@ static ctl_table mq_sysctls[] = {
.data = &init_ipc_ns.mq_queues_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_mq_dointvec_minmax,
- .extra1 = &msg_queues_limit_min,
- .extra2 = &msg_queues_limit_max,
+ .proc_handler = proc_mq_dointvec,
},
{
.procname = "msg_max",