diff options
author | Coly Li <colyli@suse.de> | 2020-02-13 17:12:07 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-02-13 18:53:50 +0300 |
commit | 4ec31cb6241d95879aac337cc6b50c45dd10cfcb (patch) | |
tree | 92f044a8c695a5de4f6044ad14e69c708d038a12 /drivers | |
parent | 309cc719a2c869b71a7388209a0a80d4284d98fd (diff) | |
download | linux-4ec31cb6241d95879aac337cc6b50c45dd10cfcb.tar.xz |
bcache: remove macro nr_to_fifo_front()
Macro nr_to_fifo_front() is only used once in btree_flush_write(),
it is unncessary indeed. This patch removes this macro and does
calculation directly in place.
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/bcache/journal.c | 7 |
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; } |