summaryrefslogtreecommitdiff
path: root/crypto/internal.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2013-07-21 20:21:51 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-07-21 20:21:51 -0300
commitf0ac15bbc96ebfde7dfe128f8260d58fc794fbe3 (patch)
tree2c8338c93b2e5e1c4fb2c36de1524adf76605f25 /crypto/internal.h
parentab1aff59fb9770e4a5b931293a695416cf23000c (diff)
parent60c61f0d0919094cede7f96cf52cc79829b82e02 (diff)
downloadlinux-crypto-f0ac15bbc96ebfde7dfe128f8260d58fc794fbe3.tar.gz
linux-crypto-f0ac15bbc96ebfde7dfe128f8260d58fc794fbe3.zip
Merge tag 'v3.11-rc2' into patchwork
Linux 3.11-rc2 * tag 'v3.11-rc2': (9535 commits) Linux 3.11-rc2 ext3: fix a BUG when opening a file with O_TMPFILE flag ext4: fix a BUG when opening a file with O_TMPFILE flag vfs: constify dentry parameter in d_count() livelock avoidance in sget() allow O_TMPFILE to work with O_WRONLY Btrfs: fix wrong write offset when replacing a device Btrfs: re-add root to dead root list if we stop dropping it Btrfs: fix lock leak when resuming snapshot deletion Btrfs: update drop progress before stopping snapshot dropping arm64: use common reboot infrastructure arm64: mm: don't treat user cache maintenance faults as writes arm64: add '#ifdef CONFIG_COMPAT' for aarch32_break_handler() arm64: Only enable local interrupts after the CPU is marked online MIPS: kvm: Kconfig: Drop HAVE_KVM dependency from VIRTUALIZATION um: remove dead code um: siginfo cleanup MIPS: Octeon: Fix DT pruning bug with pip ports uml: Fix which_tmpdir failure when /dev/shm is a symlink, and in other edge cases um: Fix wait_stub_done() error handling ...
Diffstat (limited to 'crypto/internal.h')
-rw-r--r--crypto/internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/internal.h b/crypto/internal.h
index 9ebedae3..bd39bfc9 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -103,6 +103,12 @@ int crypto_register_notifier(struct notifier_block *nb);
int crypto_unregister_notifier(struct notifier_block *nb);
int crypto_probing_notify(unsigned long val, void *v);
+static inline struct crypto_alg *crypto_alg_get(struct crypto_alg *alg)
+{
+ atomic_inc(&alg->cra_refcnt);
+ return alg;
+}
+
static inline void crypto_alg_put(struct crypto_alg *alg)
{
if (atomic_dec_and_test(&alg->cra_refcnt) && alg->cra_destroy)