diff options
author | Joe Perches <joe@perches.com> | 2013-06-19 15:15:53 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-08-20 07:06:40 -0400 |
commit | 8be04b9374e59923fa337766aaa74151b95b7099 (patch) | |
tree | 7491f7f6a9ebeb9f78ed41a94591ffd70e99b870 /fs/ext4/super.c | |
parent | 85dbe706074c8b9091a3bc5f24eff02a044701c3 (diff) |
treewide: Add __GFP_NOWARN to k.alloc calls with v.alloc fallbacks
Don't emit OOM warnings when k.alloc calls fail when
there there is a v.alloc immediately afterwards.
Converted a kmalloc/vmalloc with memset to kzalloc/vzalloc.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index bca26f34edf4..ffdfe385b029 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -162,7 +162,7 @@ void *ext4_kvmalloc(size_t size, gfp_t flags) | |||
162 | { | 162 | { |
163 | void *ret; | 163 | void *ret; |
164 | 164 | ||
165 | ret = kmalloc(size, flags); | 165 | ret = kmalloc(size, flags | __GFP_NOWARN); |
166 | if (!ret) | 166 | if (!ret) |
167 | ret = __vmalloc(size, flags, PAGE_KERNEL); | 167 | ret = __vmalloc(size, flags, PAGE_KERNEL); |
168 | return ret; | 168 | return ret; |
@@ -172,7 +172,7 @@ void *ext4_kvzalloc(size_t size, gfp_t flags) | |||
172 | { | 172 | { |
173 | void *ret; | 173 | void *ret; |
174 | 174 | ||
175 | ret = kzalloc(size, flags); | 175 | ret = kzalloc(size, flags | __GFP_NOWARN); |
176 | if (!ret) | 176 | if (!ret) |
177 | ret = __vmalloc(size, flags | __GFP_ZERO, PAGE_KERNEL); | 177 | ret = __vmalloc(size, flags | __GFP_ZERO, PAGE_KERNEL); |
178 | return ret; | 178 | return ret; |