summaryrefslogtreecommitdiffstats
path: root/fs/file.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-04-15 14:02:24 -0600
committerJens Axboe <axboe@fb.com>2014-04-15 14:02:24 -0600
commitf89e0dd9d1a72fdf6b8958bcadfa6abf84f3cae0 (patch)
tree6d4ca8c67dc22d1c81053392078588f9ab3804b5 /fs/file.c
parent21f9fcd81593e201172160853b8647336fb81f4f (diff)
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
downloadop-kernel-dev-f89e0dd9d1a72fdf6b8958bcadfa6abf84f3cae0.zip
op-kernel-dev-f89e0dd9d1a72fdf6b8958bcadfa6abf84f3cae0.tar.gz
Merge tag 'v3.15-rc1' into for-3.16/core
We don't like this, but things have diverged with the blk-mq fixes in 3.15-rc1. So merge it in.
Diffstat (limited to 'fs/file.c')
-rw-r--r--fs/file.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/file.c b/fs/file.c
index b61293b..8f294cf 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -25,7 +25,10 @@
int sysctl_nr_open __read_mostly = 1024*1024;
int sysctl_nr_open_min = BITS_PER_LONG;
-int sysctl_nr_open_max = 1024 * 1024; /* raised later */
+/* our max() is unusable in constant expressions ;-/ */
+#define __const_max(x, y) ((x) < (y) ? (x) : (y))
+int sysctl_nr_open_max = __const_max(INT_MAX, ~(size_t)0/sizeof(void *)) &
+ -BITS_PER_LONG;
static void *alloc_fdmem(size_t size)
{
@@ -429,12 +432,6 @@ void exit_files(struct task_struct *tsk)
}
}
-void __init files_defer_init(void)
-{
- sysctl_nr_open_max = min((size_t)INT_MAX, ~(size_t)0/sizeof(void *)) &
- -BITS_PER_LONG;
-}
-
struct files_struct init_files = {
.count = ATOMIC_INIT(1),
.fdt = &init_files.fdtab,
OpenPOWER on IntegriCloud