summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/journal.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-03-11 18:45:26 +0000
committerMark Brown <broonie@kernel.org>2020-03-11 18:45:26 +0000
commit4d90a4e677c5c45c787a774c84442e75c7ddd5be (patch)
tree50312d13362dd49615148661ae7e6d91ac349719 /drivers/md/bcache/journal.c
parent9032cdd96a2d4b0ef2f43499328f8a68050be2ec (diff)
parent2c523b344dfa65a3738e7039832044aa133c75fb (diff)
downloadlinux-4d90a4e677c5c45c787a774c84442e75c7ddd5be.tar.bz2
Merge tag 'v5.6-rc5' into asoc-5.7
Linux 5.6-rc5
Diffstat (limited to 'drivers/md/bcache/journal.c')
-rw-r--r--drivers/md/bcache/journal.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
index 6730820780b0..0e3ff9745ac7 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -417,8 +417,6 @@ err:
/* Journalling */
-#define nr_to_fifo_front(p, front_p, mask) (((p) - (front_p)) & (mask))
-
static void btree_flush_write(struct cache_set *c)
{
struct btree *b, *t, *btree_nodes[BTREE_FLUSH_NR];
@@ -510,9 +508,8 @@ static void btree_flush_write(struct cache_set *c)
* journal entry can be reclaimed). These selected nodes
* will be ignored and skipped in the folowing for-loop.
*/
- if (nr_to_fifo_front(btree_current_write(b)->journal,
- fifo_front_p,
- mask) != 0) {
+ if (((btree_current_write(b)->journal - fifo_front_p) &
+ mask) != 0) {
mutex_unlock(&b->write_lock);
continue;
}