Commit ddd8877d authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Philipp Reisner

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: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 5e472264
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment