]> err.no Git - linux-2.6/commitdiff
uml-harddog: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:16:54 +0000 (19:16 +0200)
committerJonathan Corbet <corbet@lwn.net>
Wed, 2 Jul 2008 21:06:26 +0000 (15:06 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/um/drivers/harddog_kern.c

index a9ad4bd6d953d2255d82e3776b816165e50a94aa..d332503fa1beae1f54a53fbbb62356ea2113cfb1 100644 (file)
@@ -66,6 +66,7 @@ static int harddog_open(struct inode *inode, struct file *file)
        int err = -EBUSY;
        char *sock = NULL;
 
+       lock_kernel();
        spin_lock(&lock);
        if(timer_alive)
                goto err;
@@ -82,9 +83,11 @@ static int harddog_open(struct inode *inode, struct file *file)
 
        timer_alive = 1;
        spin_unlock(&lock);
+       unlock_kernel();
        return nonseekable_open(inode, file);
 err:
        spin_unlock(&lock);
+       unlock_kernel();
        return err;
 }