drbd: Use drbd_crypto_is_hash() instead of an open coded check
authorPhilipp Reisner <philipp.reisner@linbit.com>
Mon, 28 Dec 2009 15:58:38 +0000 (16:58 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Tue, 29 Dec 2009 16:35:27 +0000 (17:35 +0100)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_nl.c

index 4e0726aa53b0cc12ca1759b00f7579035121870c..3313901a48614ff4ef5f2e902e7197de2a2c89e9 100644 (file)
@@ -1271,7 +1271,7 @@ static int drbd_nl_net_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp,
                        goto fail;
                }
 
-               if (crypto_tfm_alg_type(crypto_hash_tfm(tfm)) != CRYPTO_ALG_TYPE_SHASH) {
+               if (!drbd_crypto_is_hash(crypto_hash_tfm(tfm))) {
                        retcode = ERR_AUTH_ALG_ND;
                        goto fail;
                }