diff options
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r-- | ipc/mqueue.c | 65 |
1 files changed, 1 insertions, 64 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index c82d7b51ef68..e35ba2c3a8d7 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -47,15 +47,6 @@ | |||
47 | #define STATE_PENDING 1 | 47 | #define STATE_PENDING 1 |
48 | #define STATE_READY 2 | 48 | #define STATE_READY 2 |
49 | 49 | ||
50 | /* | ||
51 | * Define the ranges various user-specified maximum values can | ||
52 | * be set to. | ||
53 | */ | ||
54 | #define MIN_MSGMAX 1 /* min value for msg_max */ | ||
55 | #define MAX_MSGMAX HARD_MSGMAX /* max value for msg_max */ | ||
56 | #define MIN_MSGSIZEMAX 128 /* min value for msgsize_max */ | ||
57 | #define MAX_MSGSIZEMAX (8192*128) /* max value for msgsize_max */ | ||
58 | |||
59 | struct ext_wait_queue { /* queue of sleeping tasks */ | 50 | struct ext_wait_queue { /* queue of sleeping tasks */ |
60 | struct task_struct *task; | 51 | struct task_struct *task; |
61 | struct list_head list; | 52 | struct list_head list; |
@@ -1271,60 +1262,6 @@ void mq_put_mnt(struct ipc_namespace *ns) | |||
1271 | mntput(ns->mq_mnt); | 1262 | mntput(ns->mq_mnt); |
1272 | } | 1263 | } |
1273 | 1264 | ||
1274 | static int msg_max_limit_min = MIN_MSGMAX; | ||
1275 | static int msg_max_limit_max = MAX_MSGMAX; | ||
1276 | |||
1277 | static int msg_maxsize_limit_min = MIN_MSGSIZEMAX; | ||
1278 | static int msg_maxsize_limit_max = MAX_MSGSIZEMAX; | ||
1279 | |||
1280 | static ctl_table mq_sysctls[] = { | ||
1281 | { | ||
1282 | .procname = "queues_max", | ||
1283 | .data = &init_ipc_ns.mq_queues_max, | ||
1284 | .maxlen = sizeof(int), | ||
1285 | .mode = 0644, | ||
1286 | .proc_handler = &proc_dointvec, | ||
1287 | }, | ||
1288 | { | ||
1289 | .procname = "msg_max", | ||
1290 | .data = &init_ipc_ns.mq_msg_max, | ||
1291 | .maxlen = sizeof(int), | ||
1292 | .mode = 0644, | ||
1293 | .proc_handler = &proc_dointvec_minmax, | ||
1294 | .extra1 = &msg_max_limit_min, | ||
1295 | .extra2 = &msg_max_limit_max, | ||
1296 | }, | ||
1297 | { | ||
1298 | .procname = "msgsize_max", | ||
1299 | .data = &init_ipc_ns.mq_msgsize_max, | ||
1300 | .maxlen = sizeof(int), | ||
1301 | .mode = 0644, | ||
1302 | .proc_handler = &proc_dointvec_minmax, | ||
1303 | .extra1 = &msg_maxsize_limit_min, | ||
1304 | .extra2 = &msg_maxsize_limit_max, | ||
1305 | }, | ||
1306 | { .ctl_name = 0 } | ||
1307 | }; | ||
1308 | |||
1309 | static ctl_table mq_sysctl_dir[] = { | ||
1310 | { | ||
1311 | .procname = "mqueue", | ||
1312 | .mode = 0555, | ||
1313 | .child = mq_sysctls, | ||
1314 | }, | ||
1315 | { .ctl_name = 0 } | ||
1316 | }; | ||
1317 | |||
1318 | static ctl_table mq_sysctl_root[] = { | ||
1319 | { | ||
1320 | .ctl_name = CTL_FS, | ||
1321 | .procname = "fs", | ||
1322 | .mode = 0555, | ||
1323 | .child = mq_sysctl_dir, | ||
1324 | }, | ||
1325 | { .ctl_name = 0 } | ||
1326 | }; | ||
1327 | |||
1328 | static int __init init_mqueue_fs(void) | 1265 | static int __init init_mqueue_fs(void) |
1329 | { | 1266 | { |
1330 | int error; | 1267 | int error; |
@@ -1336,7 +1273,7 @@ static int __init init_mqueue_fs(void) | |||
1336 | return -ENOMEM; | 1273 | return -ENOMEM; |
1337 | 1274 | ||
1338 | /* ignore failues - they are not fatal */ | 1275 | /* ignore failues - they are not fatal */ |
1339 | mq_sysctl_table = register_sysctl_table(mq_sysctl_root); | 1276 | mq_sysctl_table = mq_register_sysctl_table(); |
1340 | 1277 | ||
1341 | error = register_filesystem(&mqueue_fs_type); | 1278 | error = register_filesystem(&mqueue_fs_type); |
1342 | if (error) | 1279 | if (error) |