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 | |
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')
-rw-r--r-- | fs/btrfs/send.c | 2 | ||||
-rw-r--r-- | fs/ext4/super.c | 4 | ||||
-rw-r--r-- | fs/gfs2/dir.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index d3f3b43cae0b..2e14fd89a8b4 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c | |||
@@ -219,7 +219,7 @@ static int fs_path_ensure_buf(struct fs_path *p, int len) | |||
219 | len = PAGE_ALIGN(len); | 219 | len = PAGE_ALIGN(len); |
220 | 220 | ||
221 | if (p->buf == p->inline_buf) { | 221 | if (p->buf == p->inline_buf) { |
222 | tmp_buf = kmalloc(len, GFP_NOFS); | 222 | tmp_buf = kmalloc(len, GFP_NOFS | __GFP_NOWARN); |
223 | if (!tmp_buf) { | 223 | if (!tmp_buf) { |
224 | tmp_buf = vmalloc(len); | 224 | tmp_buf = vmalloc(len); |
225 | if (!tmp_buf) | 225 | if (!tmp_buf) |
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; |
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 0cb4c1557f20..2e5fc268d324 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -1859,7 +1859,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len, | |||
1859 | 1859 | ||
1860 | memset(&rlist, 0, sizeof(struct gfs2_rgrp_list)); | 1860 | memset(&rlist, 0, sizeof(struct gfs2_rgrp_list)); |
1861 | 1861 | ||
1862 | ht = kzalloc(size, GFP_NOFS); | 1862 | ht = kzalloc(size, GFP_NOFS | __GFP_NOWARN); |
1863 | if (ht == NULL) | 1863 | if (ht == NULL) |
1864 | ht = vzalloc(size); | 1864 | ht = vzalloc(size); |
1865 | if (!ht) | 1865 | if (!ht) |