summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-01-28 14:24:05 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-09-28 10:26:33 +0200
commitddd8877d3169ebda7272667fc3dc9768204a157f (patch)
tree7566b52248ffdb9c9c76f989f1b4a95bba39c255 /drivers
parent5e4722645afb27ee749ea65988544450f08f78ba (diff)
drbd: Remove unnecessary reference counting left-over
Nothing in this function accesses mdev->tconn->net_conf, so there is no need for get_net_conf() / put_net_conf() anymore. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/drbd/drbd_req.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index df5f1062732..e11ea475a4a 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -328,9 +328,6 @@ static int _req_conflicts(struct drbd_request *req)
D_ASSERT(drbd_interval_empty(&req->i));
- if (!get_net_conf(mdev->tconn))
- return 0;
-
i = drbd_find_overlap(&mdev->write_requests, sector, size);
if (i) {
dev_alert(DEV, "%s[%u] Concurrent %s write detected! "
@@ -340,17 +337,9 @@ static int _req_conflicts(struct drbd_request *req)
i->local ? "local" : "remote",
(unsigned long long)sector, size,
(unsigned long long)i->sector, i->size);
- goto out_conflict;
+ return 1;
}
-
- /* this is like it should be, and what we expected.
- * our users do behave after all... */
- put_net_conf(mdev->tconn);
return 0;
-
-out_conflict:
- put_net_conf(mdev->tconn);
- return 1;
}
/* obviously this could be coded as many single functions