summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_actlog.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-11-07 10:54:28 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 16:58:05 +0100
commit376694a0543f5da194d9c6e102cfcd023ffac949 (patch)
tree6c470c16923152a64c76539b9889a4f8ee2a4a2f /drivers/block/drbd/drbd_actlog.c
parent9bcd2521827bb7c418a83a77474c449d6496d55c (diff)
downloadop-kernel-dev-376694a0543f5da194d9c6e102cfcd023ffac949.zip
op-kernel-dev-376694a0543f5da194d9c6e102cfcd023ffac949.tar.gz
drbd: Silenced compiler warnings
Since version 4.6.1 gcc warns about variables that get a value assigned, but which are never read later on. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_actlog.c')
-rw-r--r--drivers/block/drbd/drbd_actlog.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c
index 4dd5208..ade79be 100644
--- a/drivers/block/drbd/drbd_actlog.c
+++ b/drivers/block/drbd/drbd_actlog.c
@@ -264,8 +264,7 @@ void drbd_al_begin_io(struct drbd_conf *mdev, struct drbd_interval *i)
/* Double check: it may have been committed by someone else,
* while we have been waiting for the lock. */
if (mdev->act_log->pending_changes) {
- int err;
- err = al_write_transaction(mdev);
+ al_write_transaction(mdev);
mdev->al_writ_cnt++;
spin_lock_irq(&mdev->al_lock);
@@ -290,7 +289,6 @@ void drbd_al_complete_io(struct drbd_conf *mdev, struct drbd_interval *i)
unsigned enr;
struct lc_element *extent;
unsigned long flags;
- bool wake = false;
spin_lock_irqsave(&mdev->al_lock, flags);
@@ -300,8 +298,7 @@ void drbd_al_complete_io(struct drbd_conf *mdev, struct drbd_interval *i)
dev_err(DEV, "al_complete_io() called on inactive extent %u\n", enr);
continue;
}
- if (lc_put(mdev->act_log, extent) == 0)
- wake = true;
+ lc_put(mdev->act_log, extent);
}
spin_unlock_irqrestore(&mdev->al_lock, flags);
wake_up(&mdev->al_wait);
@@ -730,7 +727,7 @@ void __drbd_set_in_sync(struct drbd_conf *mdev, sector_t sector, int size,
int __drbd_set_out_of_sync(struct drbd_conf *mdev, sector_t sector, int size,
const char *file, const unsigned int line)
{
- unsigned long sbnr, ebnr, lbnr, flags;
+ unsigned long sbnr, ebnr, flags;
sector_t esector, nr_sectors;
unsigned int enr, count = 0;
struct lc_element *e;
@@ -752,8 +749,6 @@ int __drbd_set_out_of_sync(struct drbd_conf *mdev, sector_t sector, int size,
if (!expect(esector < nr_sectors))
esector = nr_sectors - 1;
- lbnr = BM_SECT_TO_BIT(nr_sectors-1);
-
/* we set it out of sync,
* we do not need to round anything here */
sbnr = BM_SECT_TO_BIT(sector);
OpenPOWER on IntegriCloud