diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-11-18 11:09:49 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-11-21 11:59:16 -0500 |
commit | 39ce81ce7168aa7226fb9f182c3a2b57060d0905 (patch) | |
tree | 8b3c8ff8559c7d3243c0299cae6986aa21601c60 /fs/ubifs/file.c | |
parent | 7e2d9bfa4eabee3e1919a40f20d2ef8b569bd07e (diff) |
UBIFS: do not print scary memory allocation warnings
Bulk-read allocates a lot of memory with 'kmalloc()', and when it
is/gets fragmented 'kmalloc()' fails with a scarry warning. But
because bulk-read is just an optimization, UBIFS keeps working fine.
Supress the warning by passing __GFP_NOWARN option to 'kmalloc()'.
This patch also introduces a macro for the magic 128KiB constant.
This is just neater.
Note, this is not really fixes the problem we had, but just hides
the warnings. The further patches fix the problem.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/file.c')
-rw-r--r-- | fs/ubifs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 9124eee73aea..8be827cc7078 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -705,12 +705,12 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct page *page1) | |||
705 | int err, page_idx, page_cnt, ret = 0, n = 0; | 705 | int err, page_idx, page_cnt, ret = 0, n = 0; |
706 | loff_t isize; | 706 | loff_t isize; |
707 | 707 | ||
708 | bu = kmalloc(sizeof(struct bu_info), GFP_NOFS); | 708 | bu = kmalloc(sizeof(struct bu_info), GFP_NOFS | __GFP_NOWARN); |
709 | if (!bu) | 709 | if (!bu) |
710 | return 0; | 710 | return 0; |
711 | 711 | ||
712 | bu->buf_len = c->bulk_read_buf_size; | 712 | bu->buf_len = c->bulk_read_buf_size; |
713 | bu->buf = kmalloc(bu->buf_len, GFP_NOFS); | 713 | bu->buf = kmalloc(bu->buf_len, GFP_NOFS | __GFP_NOWARN); |
714 | if (!bu->buf) | 714 | if (!bu->buf) |
715 | goto out_free; | 715 | goto out_free; |
716 | 716 | ||