History

Configure out file locking features

This patch adds the CONFIG_FILE_LOCKING option which allows to remove support for advisory locks. With this patch enabled, the flock() system call, the F_GETLK, F_SETLK and F_SETLKW operations of fcntl() and NFS support are disabled. These features are not necessarly needed on embedded systems. It allows to save ~11 Kb of kernel code and data: text data bss dec hex filename 1125436 118764 212992 1457192 163c28 vmlinux.old 1114299 118564 212992 1445855 160fdf vmlinux -11137 -200 0 -11337 -2C49 +/- This patch has originally been written by Matt Mackall <mpm@selenic.com>, and is part of the Linux Tiny project.

Thomas Petazzoni committed 18 years ago

Commit bfcd17a1 parent 04716e66 files · +70 −9Browse files

Showing the changes to kernel/sysctl.c (1 of 6 files). Show all

Unified · Split

kernel/sysctl.c+5−1
@@ -97,7 +97,7 @@ static int sixty = 60; · 96 unmodified lines
9797 static int neg_one = -1;
9898 #endif
9999
100−#ifdef CONFIG_MMU
100+#if defined(CONFIG_MMU) && defined(CONFIG_FILE_LOCKING)
101101 static int two = 2;
102102 #endif
103103
@@ -1261,6 +1261,7 @@ static struct ctl_table fs_table[] = { · 1157 unmodified lines
12611261 .extra1 = &minolduid,
12621262 .extra2 = &maxolduid,
12631263 },
1264+#ifdef CONFIG_FILE_LOCKING
12641265 {
12651266 .ctl_name = FS_LEASES,
12661267 .procname = "leases-enable",
@@ -1269,6 +1270,7 @@ static struct ctl_table fs_table[] = { · 2 unmodified lines
12691270 .mode = 0644,
12701271 .proc_handler = &proc_dointvec,
12711272 },
1273+#endif
12721274 #ifdef CONFIG_DNOTIFY
12731275 {
12741276 .ctl_name = FS_DIR_NOTIFY,
@@ -1280,6 +1282,7 @@ static struct ctl_table fs_table[] = { · 5 unmodified lines
12801282 },
12811283 #endif
12821284 #ifdef CONFIG_MMU
1285+#ifdef CONFIG_FILE_LOCKING
12831286 {
12841287 .ctl_name = FS_LEASE_TIME,
12851288 .procname = "lease-break-time",
@@ -1291,6 +1294,7 @@ static struct ctl_table fs_table[] = { · 5 unmodified lines
12911294 .extra1 = &zero,
12921295 .extra2 = &two,
12931296 },
1297+#endif
12941298 {
12951299 .procname = "aio-nr",
12961300 .data = &aio_nr,