Skip to contentSkip to conversation

Document that bio_alloc with __GFP_WAIT cannot fail

PATCH In review Nikanth Karthikesan 1 participant 1 message Apr 15, 2009 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/7 Document that bio_alloc with __GFP_WAIT cannot fail

Document that bio_alloc with __GFP_WAIT cannot fail.

---

fs/bio.c +4 -0
index e0c9e54..5b5dfdd 100644
@@ -348,6 +348,10 @@ err:
 	return NULL;
 }
 
+/*
+ * This will not fail as long as __GFP_WAIT is specified
+ * in the gfp_mask, as mempool backing is used.
+ */
 struct bio *bio_alloc(gfp_t gfp_mask, int nr_iovecs)
 {
 	struct bio *bio = bio_alloc_bioset(gfp_mask, nr_iovecs, fs_bio_set);