]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bio: Fix kabi error
authorJason Luo <zhangqing.luo@oracle.com>
Thu, 25 Feb 2016 08:52:10 +0000 (16:52 +0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 20:40:04 +0000 (12:40 -0800)
The two commits:
    bio: skip atomic inc/dec of ->bi_remaining for non-chains
    bio: skip atomic inc/dec of ->bi_cnt for most use cases
rename some members of struct bio which causes KABI changes

Orabug: 22820562
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
block/bio.c
fs/btrfs/volumes.c
include/linux/bio.h
include/linux/blk_types.h

index 259197d97de1a6e5705457f58dc7727665ab1a93..585053238fcb10497aa1dae9e5a4d24bd9aef570 100644 (file)
@@ -270,8 +270,8 @@ void bio_init(struct bio *bio)
 {
        memset(bio, 0, sizeof(*bio));
        bio->bi_flags = 1 << BIO_UPTODATE;
-       atomic_set(&bio->__bi_remaining, 1);
-       atomic_set(&bio->__bi_cnt, 1);
+       atomic_set(&bio->bi_remaining, 1);
+       atomic_set(&bio->bi_cnt, 1);
 }
 EXPORT_SYMBOL(bio_init);
 
@@ -293,7 +293,7 @@ void bio_reset(struct bio *bio)
 
        memset(bio, 0, BIO_RESET_BYTES);
        bio->bi_flags = flags | (1 << BIO_UPTODATE);
-       atomic_set(&bio->__bi_remaining, 1);
+       atomic_set(&bio->bi_remaining, 1);
 }
 EXPORT_SYMBOL(bio_reset);
 
@@ -311,7 +311,7 @@ static inline void bio_inc_remaining(struct bio *bio)
 {
        bio->bi_flags |= (1 << BIO_CHAIN);
        smp_mb__before_atomic();
-       atomic_inc(&bio->__bi_remaining);
+       atomic_inc(&bio->bi_remaining);
 }
 
 /**
@@ -538,12 +538,12 @@ void bio_put(struct bio *bio)
        if (!bio_flagged(bio, BIO_REFFED))
                bio_free(bio);
        else {
-               BIO_BUG_ON(!atomic_read(&bio->__bi_cnt));
+               BIO_BUG_ON(!atomic_read(&bio->bi_cnt));
 
                /*
                 * last put frees it
                 */
-               if (atomic_dec_and_test(&bio->__bi_cnt))
+               if (atomic_dec_and_test(&bio->bi_cnt))
                        bio_free(bio);
        }
 }
@@ -1759,15 +1759,15 @@ EXPORT_SYMBOL(bio_flush_dcache_pages);
 static inline bool bio_remaining_done(struct bio *bio)
 {
        /*
-        * If we're not chaining, then ->__bi_remaining is always 1 and
+        * If we're not chaining, then ->bi_remaining is always 1 and
         * we always end io on the first invocation.
         */
        if (!bio_flagged(bio, BIO_CHAIN))
                return true;
 
-       BUG_ON(atomic_read(&bio->__bi_remaining) <= 0);
+       BUG_ON(atomic_read(&bio->bi_remaining) <= 0);
 
-       if (atomic_dec_and_test(&bio->__bi_remaining)) {
+       if (atomic_dec_and_test(&bio->bi_remaining)) {
                clear_bit(BIO_CHAIN, &bio->bi_flags);
                return true;
        }
index 53af23f2c087ad015e720af094fbfc53e1671317..554ece031e0de71fb126809ae7eb5ac88fdac36d 100644 (file)
@@ -345,7 +345,7 @@ loop_lock:
                    waitqueue_active(&fs_info->async_submit_wait))
                        wake_up(&fs_info->async_submit_wait);
 
-               BUG_ON(atomic_read(&cur->__bi_cnt) == 0);
+               BUG_ON(atomic_read(&cur->bi_cnt) == 0);
 
                /*
                 * if we're doing the sync list, record that our
index f0291cf64cc5f6d26a2e60ee5e1cfc02431556d5..0e7d930620a6229c4ea79d4818eee571526a748e 100644 (file)
@@ -294,7 +294,7 @@ static inline void bio_get(struct bio *bio)
 {
        bio->bi_flags |= (1 << BIO_REFFED);
        smp_mb__before_atomic();
-       atomic_inc(&bio->__bi_cnt);
+       atomic_inc(&bio->bi_cnt);
 }
 
 static inline void bio_cnt_set(struct bio *bio, unsigned int count)
@@ -303,7 +303,7 @@ static inline void bio_cnt_set(struct bio *bio, unsigned int count)
                bio->bi_flags |= (1 << BIO_REFFED);
                smp_mb__before_atomic();
        }
-       atomic_set(&bio->__bi_cnt, count);
+       atomic_set(&bio->bi_cnt, count);
 }
 
 enum bip_flags {
index cc2e85a6f5fe870b069cc680fa2bc17b4a4538f1..82206993c175f57fd83b97cde244b78035ff5fab 100644 (file)
@@ -65,7 +65,7 @@ struct bio {
        unsigned int            bi_seg_front_size;
        unsigned int            bi_seg_back_size;
 
-       atomic_t                __bi_remaining;
+       atomic_t                bi_remaining;
 
        bio_end_io_t            *bi_end_io;
 
@@ -92,7 +92,7 @@ struct bio {
 
        unsigned short          bi_max_vecs;    /* max bvl_vecs we can hold */
 
-       atomic_t                __bi_cnt;       /* pin count */
+       atomic_t                bi_cnt; /* pin count */
 
        struct bio_vec          *bi_io_vec;     /* the actual vec list */