]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drbd: Remove unnecessary reference counting left-over
authorAndreas Gruenbacher <agruen@linbit.com>
Fri, 28 Jan 2011 13:24:05 +0000 (14:24 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 28 Sep 2011 08:26:33 +0000 (10:26 +0200)
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>
drivers/block/drbd/drbd_req.c

index df5f106273275160be69478193a70f60deec5c83..e11ea475a4a3a7624bc39aba1a816f83980d9321 100644 (file)
@@ -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