Skip to content

Commit

Permalink
agp-frontend: 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 Jun 20, 2008
1 parent 8f59342 commit a076230
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/char/agp/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include "agp.h"
Expand Down Expand Up @@ -677,6 +678,7 @@ static int agp_open(struct inode *inode, struct file *file)
struct agp_client *client;
int rc = -ENXIO;

lock_kernel();
mutex_lock(&(agp_fe.agp_mutex));

if (minor != AGPGART_MINOR)
Expand All @@ -703,12 +705,14 @@ static int agp_open(struct inode *inode, struct file *file)
agp_insert_file_private(priv);
DBG("private=%p, client=%p", priv, client);
mutex_unlock(&(agp_fe.agp_mutex));
unlock_kernel();
return 0;

err_out_nomem:
rc = -ENOMEM;
err_out:
mutex_unlock(&(agp_fe.agp_mutex));
unlock_kernel();
return rc;
}

Expand Down

0 comments on commit a076230

Please sign in to comment.