]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
crypto-zcrypt_api: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:15:46 +0000 (19:15 +0200)
committerJonathan Corbet <corbet@lwn.net>
Fri, 20 Jun 2008 20:05:55 +0000 (14:05 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/s390/crypto/zcrypt_api.c

index 4d36e805a2348b40995c76625986559f735c5978..e41c2fa86d8b4455fd19c82c4034cc00a44012fe 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/fs.h>
 #include <linux/proc_fs.h>
 #include <linux/compat.h>
+#include <linux/smp_lock.h>
 #include <asm/atomic.h>
 #include <asm/uaccess.h>
 #include <linux/hw_random.h>
@@ -300,7 +301,9 @@ static ssize_t zcrypt_write(struct file *filp, const char __user *buf,
  */
 static int zcrypt_open(struct inode *inode, struct file *filp)
 {
+       lock_kernel();
        atomic_inc(&zcrypt_open_count);
+       unlock_kernel();
        return 0;
 }