Patchwork [1/2,Saucy,SRU] UBUNTU: dm-raid4-5: Fix compile issues

login
register
mail settings
Submitter Tim Gardner
Date Oct. 17, 2013, 5:05 p.m.
Message ID <1382029550-127756-1-git-send-email-tim.gardner@canonical.com>
Download mbox | patch
Permalink /patch/284320/
State New
Headers show

Comments

Tim Gardner - Oct. 17, 2013, 5:05 p.m.
BugLink: http://bugs.launchpad.net/bugs/1241086

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 ubuntu/dm-raid4-5/dm-raid4-5.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Brad Figg - Oct. 17, 2013, 5:15 p.m.
On 10/17/2013 10:05 AM, Tim Gardner wrote:
> BugLink: http://bugs.launchpad.net/bugs/1241086
> 
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  ubuntu/dm-raid4-5/dm-raid4-5.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/ubuntu/dm-raid4-5/dm-raid4-5.c b/ubuntu/dm-raid4-5/dm-raid4-5.c
> index e87eac4..a570dcf 100644
> --- a/ubuntu/dm-raid4-5/dm-raid4-5.c
> +++ b/ubuntu/dm-raid4-5/dm-raid4-5.c
> @@ -910,7 +910,7 @@ static int raid_dev_lookup(struct raid_set *rs, struct raid_dev *dev_lookup)
>   * Stripe hash functions
>   */
>  /* Initialize/destroy stripe hash. */
> -static int hash_init(struct stripe_hash *hash, unsigned stripes)
> +static int dm45_hash_init(struct stripe_hash *hash, unsigned stripes)
>  {
>  	unsigned buckets = 2, max_buckets = stripes >> 1;
>  	static unsigned hash_primes[] = {
> @@ -996,7 +996,7 @@ static int sc_hash_resize(struct stripe_cache *sc)
>  		int r;
>  		struct stripe_hash hash;
>  
> -		r = hash_init(&hash, atomic_read(&sc->stripes));
> +		r = dm45_hash_init(&hash, atomic_read(&sc->stripes));
>  		if (r)
>  			return r;
>  
> @@ -1723,7 +1723,7 @@ static void bio_copy_page_list(int rw, struct stripe *stripe,
>  	bio_for_each_segment(bv, bio, i) {
>  		int len = bv->bv_len, size;
>  		unsigned bio_offset = 0;
> -		void *bio_addr = __bio_kmap_atomic(bio, i, KM_USER0);
> +		void *bio_addr = __bio_kmap_atomic(bio, i);
>  redo:
>  		size = (page_offset + len > PAGE_SIZE) ?
>  		       PAGE_SIZE - page_offset : len;
> @@ -1756,7 +1756,7 @@ redo:
>  			}
>  		}
>  
> -		__bio_kunmap_atomic(bio_addr, KM_USER0);
> +		__bio_kunmap_atomic(bio_addr);
>  	}
>  }
>  
>
Seth Forshee - Oct. 17, 2013, 7:20 p.m.
Ack for both patches.
Stefan Bader - Oct. 18, 2013, 9:12 a.m.
Applied both to saucy master-next.

Patch

diff --git a/ubuntu/dm-raid4-5/dm-raid4-5.c b/ubuntu/dm-raid4-5/dm-raid4-5.c
index e87eac4..a570dcf 100644
--- a/ubuntu/dm-raid4-5/dm-raid4-5.c
+++ b/ubuntu/dm-raid4-5/dm-raid4-5.c
@@ -910,7 +910,7 @@  static int raid_dev_lookup(struct raid_set *rs, struct raid_dev *dev_lookup)
  * Stripe hash functions
  */
 /* Initialize/destroy stripe hash. */
-static int hash_init(struct stripe_hash *hash, unsigned stripes)
+static int dm45_hash_init(struct stripe_hash *hash, unsigned stripes)
 {
 	unsigned buckets = 2, max_buckets = stripes >> 1;
 	static unsigned hash_primes[] = {
@@ -996,7 +996,7 @@  static int sc_hash_resize(struct stripe_cache *sc)
 		int r;
 		struct stripe_hash hash;
 
-		r = hash_init(&hash, atomic_read(&sc->stripes));
+		r = dm45_hash_init(&hash, atomic_read(&sc->stripes));
 		if (r)
 			return r;
 
@@ -1723,7 +1723,7 @@  static void bio_copy_page_list(int rw, struct stripe *stripe,
 	bio_for_each_segment(bv, bio, i) {
 		int len = bv->bv_len, size;
 		unsigned bio_offset = 0;
-		void *bio_addr = __bio_kmap_atomic(bio, i, KM_USER0);
+		void *bio_addr = __bio_kmap_atomic(bio, i);
 redo:
 		size = (page_offset + len > PAGE_SIZE) ?
 		       PAGE_SIZE - page_offset : len;
@@ -1756,7 +1756,7 @@  redo:
 			}
 		}
 
-		__bio_kunmap_atomic(bio_addr, KM_USER0);
+		__bio_kunmap_atomic(bio_addr);
 	}
 }