- fs-bioc-tweaks.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     fs/bio.c: tweaks

has been removed from the -mm tree.  Its filename is

     fs-bioc-tweaks.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: fs/bio.c: tweaks
From: Andreas Mohr <andi@xxxxxxxxxxxxxxxxxxxxxxx>

- Calculate a variable in bvec_alloc_bs() only once needed, not earlier
  (bio.o down from 18408 to 18376 Bytes, 32 Bytes saved, probably due to
  data locality improvements).

- Init variable idx to silence a gcc warning which already existed in the
  unmodified original base file (bvec_alloc_bs() handles idx correctly, so
  there's no need for the warning):

	fs/bio.c: In function `bio_alloc_bioset':
	fs/bio.c:169: warning: `idx' may be used uninitialized in this function

Signed-off-by: Andreas Mohr <andi@xxxxxxxx>
Acked-by: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/bio.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff -puN fs/bio.c~fs-bioc-tweaks fs/bio.c
--- a/fs/bio.c~fs-bioc-tweaks
+++ a/fs/bio.c
@@ -79,7 +79,6 @@ static struct bio_set *fs_bio_set;
 static inline struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned long *idx, struct bio_set *bs)
 {
 	struct bio_vec *bvl;
-	struct biovec_slab *bp;
 
 	/*
 	 * see comment near bvec_array define!
@@ -98,10 +97,12 @@ static inline struct bio_vec *bvec_alloc
 	 * idx now points to the pool we want to allocate from
 	 */
 
-	bp = bvec_slabs + *idx;
 	bvl = mempool_alloc(bs->bvec_pools[*idx], gfp_mask);
-	if (bvl)
+	if (bvl) {
+		struct biovec_slab *bp = bvec_slabs + *idx;
+
 		memset(bvl, 0, bp->nr_vecs * sizeof(struct bio_vec));
+	}
 
 	return bvl;
 }
@@ -166,7 +167,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_m
 
 		bio_init(bio);
 		if (likely(nr_iovecs)) {
-			unsigned long idx;
+			unsigned long idx = 0; /* shut up gcc */
 
 			bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs);
 			if (unlikely(!bvl)) {
_

Patches currently in -mm which might be from andi@xxxxxxxxxxxxxxxxxxxxxxx are

origin.patch
fix-buggy-mtrr-address-checks.patch
acx1xx-wireless-driver.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux