diff options
Diffstat (limited to 'fs/file.c')
-rw-r--r-- | fs/file.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -37,11 +37,12 @@ static void *alloc_fdmem(size_t size) | |||
37 | * vmalloc() if the allocation size will be considered "large" by the VM. | 37 | * vmalloc() if the allocation size will be considered "large" by the VM. |
38 | */ | 38 | */ |
39 | if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) { | 39 | if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) { |
40 | void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY); | 40 | void *data = kmalloc(size, GFP_KERNEL_ACCOUNT | |
41 | __GFP_NOWARN | __GFP_NORETRY); | ||
41 | if (data != NULL) | 42 | if (data != NULL) |
42 | return data; | 43 | return data; |
43 | } | 44 | } |
44 | return vmalloc(size); | 45 | return __vmalloc(size, GFP_KERNEL_ACCOUNT | __GFP_HIGHMEM, PAGE_KERNEL); |
45 | } | 46 | } |
46 | 47 | ||
47 | static void __free_fdtable(struct fdtable *fdt) | 48 | static void __free_fdtable(struct fdtable *fdt) |
@@ -126,7 +127,7 @@ static struct fdtable * alloc_fdtable(unsigned int nr) | |||
126 | if (unlikely(nr > sysctl_nr_open)) | 127 | if (unlikely(nr > sysctl_nr_open)) |
127 | nr = ((sysctl_nr_open - 1) | (BITS_PER_LONG - 1)) + 1; | 128 | nr = ((sysctl_nr_open - 1) | (BITS_PER_LONG - 1)) + 1; |
128 | 129 | ||
129 | fdt = kmalloc(sizeof(struct fdtable), GFP_KERNEL); | 130 | fdt = kmalloc(sizeof(struct fdtable), GFP_KERNEL_ACCOUNT); |
130 | if (!fdt) | 131 | if (!fdt) |
131 | goto out; | 132 | goto out; |
132 | fdt->max_fds = nr; | 133 | fdt->max_fds = nr; |