Whamcloud - gitweb
b=23821 Limit bio_alloc() to BIO_MAX_PAGES iovecs.
authorAndreas Dilger <andreas.dilger@oracle.com>
Thu, 23 Sep 2010 19:17:19 +0000 (13:17 -0600)
committerAndrew Perepechko <andrew.perepechko@oracle.com>
Fri, 17 Dec 2010 00:32:53 +0000 (03:32 +0300)
Fix logic error when patch was originally landed from b=9945.
i=alex.zhuravlev
i=kwestneat

lustre/obdfilter/filter_io_26.c

index c24a45b..bd2cee4 100644 (file)
@@ -397,7 +397,7 @@ int filter_do_bio(struct obd_export *exp, struct inode *inode,
                         }
 
                         /* allocate new bio, limited by max BIO size, b=9945 */
-                        bio = bio_alloc(GFP_NOIO, max(BIO_MAX_PAGES,
+                        bio = bio_alloc(GFP_NOIO, min(BIO_MAX_PAGES,
                                                       (npages - page_idx) *
                                                       blocks_per_page));
                         if (bio == NULL) {