Skip to content

Commit

Permalink
uml-harddog: BKL pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jul 2, 2008
1 parent 8702965 commit 78dccb4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/um/drivers/harddog_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit 78dccb4

Please sign in to comment.