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. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: matthew@wil.cx Cc: linux-fsdevel@vger.kernel.org Cc: mpm@selenic.com Cc: akpm@linux-foundation.org Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
committed by
J. Bruce Fields
parent
04716e6621
commit
bfcd17a6c5
@@ -97,7 +97,7 @@ static int sixty = 60;
|
||||
static int neg_one = -1;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#if defined(CONFIG_MMU) && defined(CONFIG_FILE_LOCKING)
|
||||
static int two = 2;
|
||||
#endif
|
||||
|
||||
@@ -1261,6 +1261,7 @@ static struct ctl_table fs_table[] = {
|
||||
.extra1 = &minolduid,
|
||||
.extra2 = &maxolduid,
|
||||
},
|
||||
#ifdef CONFIG_FILE_LOCKING
|
||||
{
|
||||
.ctl_name = FS_LEASES,
|
||||
.procname = "leases-enable",
|
||||
@@ -1269,6 +1270,7 @@ static struct ctl_table fs_table[] = {
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_DNOTIFY
|
||||
{
|
||||
.ctl_name = FS_DIR_NOTIFY,
|
||||
@@ -1280,6 +1282,7 @@ static struct ctl_table fs_table[] = {
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_MMU
|
||||
#ifdef CONFIG_FILE_LOCKING
|
||||
{
|
||||
.ctl_name = FS_LEASE_TIME,
|
||||
.procname = "lease-break-time",
|
||||
@@ -1291,6 +1294,7 @@ static struct ctl_table fs_table[] = {
|
||||
.extra1 = &zero,
|
||||
.extra2 = &two,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.procname = "aio-nr",
|
||||
.data = &aio_nr,
|
||||
|
||||
Reference in New Issue
Block a user