Patch "bcache: Fix building error on MIPS" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
bcache: Fix building error on MIPS
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
bcache-fix-building-error-on-mips.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
cf33c1ee5254c6a430bc1538232b49c3ea13e613Mon Sep 17 00:00:00 2001
From: Huacai Chen <[email protected]>
Date: Fri, 24 Nov 2017 15:14:25 -0800
Subject: bcache: Fix building error on MIPS
From: Huacai Chen <[email protected]>
commit cf33c1ee5254c6a430bc1538232b49c3ea13e613 upstream.
This patch try to fix the building error on MIPS. The reason is MIPS has already defined the PTR macro, which conflicts with the PTR macro in include/uapi/linux/bcache.h.
[fixed by mlyle: corrected a line-length issue]
--- drivers/md/bcache/alloc.c | 2 +- drivers/md/bcache/extents.c | 2 +- drivers/md/bcache/journal.c | 2 +- include/uapi/linux/bcache.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/md/bcache/alloc.c +1 -1
@@ -477,7 +477,7 @@ int __bch_bucket_alloc_set(struct cache_if (b ==-1 ) goto err; - k->ptr[i] =PTR (ca->buckets[b].gen, + k->ptr[i] =MAKE_PTR (ca->buckets[b].gen,bucket_to_sector (c, b), ca->sb.nr_this_dev);
drivers/md/bcache/extents.c +1 -1
@@ -584,7 +584,7 @@ static bool bch_extent_merge(struct btrereturn false;for (i =0 ; i <KEY_PTRS (l); i++) -if (l->ptr[i] +PTR (0 ,KEY_SIZE (l),0 ) != r->ptr[i] || +if (l->ptr[i] +MAKE_PTR (0 ,KEY_SIZE (l),0 ) != r->ptr[i] ||PTR_BUCKET_NR (b->c, l, i) !=PTR_BUCKET_NR (b->c, r, i))return false;
drivers/md/bcache/journal.c +1 -1
@@ -508,7 +508,7 @@ static void journal_reclaim(struct cachecontinue ; ja->cur_idx = next; - k->ptr[n++] =PTR (0 , + k->ptr[n++] =MAKE_PTR (0 ,bucket_to_sector (c, ca->sb.d[ja->cur_idx]), ca->sb.nr_this_dev); }
include/uapi/linux/bcache.h +1 -1
@@ -90,7 +90,7 @@ PTR_FIELD(PTR_GEN, 0, 8)#define PTR_CHECK_DEV ((1 << PTR_DEV_BITS) - 1) -#define PTR (gen, offset, dev) \ +#define MAKE_PTR (gen, offset, dev) \ ((((__u64) dev) << 51) | ((__u64) offset) << 8 | gen)/* Bkey utility code */
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/bcache-fix-building-error-on-mips.patch