From: Philipp Reisner <philipp.reisner@linbit.com>
To: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Subject: [PATCH 05/10] drbd: Eliminated drbd_free_resoruces() it is superseeded by conn_free_crypto()
Date: Mon, 3 Oct 2011 22:58:28 +0200 [thread overview]
Message-ID: <1317675513-12745-6-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1317675513-12745-1-git-send-email-philipp.reisner@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
drivers/block/drbd/drbd_int.h | 1 -
drivers/block/drbd/drbd_main.c | 35 ++++++++++++-----------------------
2 files changed, 12 insertions(+), 24 deletions(-)
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 3080192..0fb3fc3 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -1046,7 +1046,6 @@ extern void drbd_calc_cpu_mask(struct drbd_tconn *tconn);
#define drbd_thread_current_set_cpu(A) ({})
#define drbd_calc_cpu_mask(A) ({})
#endif
-extern void drbd_free_resources(struct drbd_conf *mdev);
extern void tl_release(struct drbd_tconn *, unsigned int barrier_nr,
unsigned int set_size);
extern void tl_clear(struct drbd_tconn *);
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 96add4e..28f1b74 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2054,7 +2054,9 @@ void drbd_mdev_cleanup(struct drbd_conf *mdev)
drbd_bm_cleanup(mdev);
}
- drbd_free_resources(mdev);
+ drbd_free_bc(mdev->ldev);
+ mdev->ldev = NULL;
+
clear_bit(AL_SUSPENDED, &mdev->flags);
D_ASSERT(list_empty(&mdev->active_ee));
@@ -2249,7 +2251,8 @@ void drbd_delete_device(struct drbd_conf *mdev)
if (mdev->this_bdev)
bdput(mdev->this_bdev);
- drbd_free_resources(mdev);
+ drbd_free_bc(mdev->ldev);
+ mdev->ldev = NULL;
drbd_release_all_peer_reqs(mdev);
@@ -2384,11 +2387,18 @@ static void drbd_free_socket(struct drbd_socket *socket)
void conn_free_crypto(struct drbd_tconn *tconn)
{
+ drbd_free_sock(tconn);
+
+ crypto_free_hash(tconn->csums_tfm);
+ crypto_free_hash(tconn->verify_tfm);
crypto_free_hash(tconn->cram_hmac_tfm);
crypto_free_hash(tconn->integrity_w_tfm);
crypto_free_hash(tconn->integrity_r_tfm);
kfree(tconn->int_dig_in);
kfree(tconn->int_dig_vv);
+
+ tconn->csums_tfm = NULL;
+ tconn->verify_tfm = NULL;
tconn->cram_hmac_tfm = NULL;
tconn->integrity_w_tfm = NULL;
tconn->integrity_r_tfm = NULL;
@@ -2697,27 +2707,6 @@ void drbd_free_sock(struct drbd_tconn *tconn)
}
}
-
-void drbd_free_resources(struct drbd_conf *mdev)
-{
- crypto_free_hash(mdev->tconn->csums_tfm);
- mdev->tconn->csums_tfm = NULL;
- crypto_free_hash(mdev->tconn->verify_tfm);
- mdev->tconn->verify_tfm = NULL;
- crypto_free_hash(mdev->tconn->cram_hmac_tfm);
- mdev->tconn->cram_hmac_tfm = NULL;
- crypto_free_hash(mdev->tconn->integrity_w_tfm);
- mdev->tconn->integrity_w_tfm = NULL;
- crypto_free_hash(mdev->tconn->integrity_r_tfm);
- mdev->tconn->integrity_r_tfm = NULL;
-
- drbd_free_sock(mdev->tconn);
-
- __no_warn(local,
- drbd_free_bc(mdev->ldev);
- mdev->ldev = NULL;);
-}
-
/* meta data management */
struct meta_data_on_disk {
--
1.7.4.1
next prev parent reply other threads:[~2011-10-03 20:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-03 20:58 [RFC 00/10] drbd: part 13 of adding multiple volume support to drbd Philipp Reisner
2011-10-03 20:58 ` [PATCH 01/10] drbd: allow status dump request all volumes of a specific resource Philipp Reisner
2011-10-03 20:58 ` [PATCH 02/10] drbd: fix setsockopt for user mode linux Philipp Reisner
2011-10-03 20:58 ` [PATCH 03/10] drbd: cmdname() enum to string convertion was missing a few constants Philipp Reisner
2011-10-03 20:58 ` [PATCH 04/10] drbd: move comment about stopping the receiver thread to where it belongs Philipp Reisner
2011-10-03 20:58 ` Philipp Reisner [this message]
2011-10-03 20:58 ` [PATCH 06/10] drbd: Basic refcounting for drbd_tconn Philipp Reisner
2011-10-03 20:58 ` [PATCH 07/10] drbd: Take a reference on tconn when finding a tconn by name Philipp Reisner
2011-10-03 20:58 ` [PATCH 08/10] drbd: Removed the OBJECT_DYING and the CONFIG_PENDING bits Philipp Reisner
2011-10-03 20:58 ` [PATCH 09/10] drbd: remove useless kobject_uevent from drbd_adm_connect Philipp Reisner
2011-10-03 20:58 ` [PATCH 10/10] drbd: fix various disconnecting races Philipp Reisner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317675513-12745-6-git-send-email-philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=axboe@kernel.dk \
--cc=drbd-dev@lists.linbit.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®