Skip to contentSkip to conversation

f2fs: Remove __GFP_NOFAIL flag from call to mempool_alloc()

PATCH New NeilBrown 1 participant 1 message Apr 10, 2017 F2FS file system

lore
Share & tools
lore

NeilBrown

author
#0 lore raw

PATCH 9/11 f2fs: Remove __GFP_NOFAIL flag from call to mempool_alloc()

Passing __GFP_NOFAIL to mempool_alloc() is strange because it bypasses the pool functionality provided by the mempool. mempool_alloc() will not fail even without the NOFAIL flag.

So remove the flag and allow the pool to be used properly.

---
 fs/f2fs/data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/data.c +1 -1
index 1602b4bccae6..7e31751ec708 100644
@@ -204,7 +204,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
 		for (; start < F2FS_IO_SIZE(sbi); start++) {
 			struct page *page =
 				mempool_alloc(sbi->write_io_dummy,
-					GFP_NOIO | __GFP_ZERO | __GFP_NOFAIL);
+					GFP_NOIO | __GFP_ZERO);
 			f2fs_bug_on(sbi, !page);
 
 			SetPagePrivate(page);
Signature · 1 line
2.12.2