changed ioctls to unlocked
PATCH 4/13 changed ioctls to unlocked
From: Stoyan Gaydarov <[email protected]>
Signed-off-by Stoyan Gaydarov <[email protected]>
--- arch/blackfin/mach-bf561/coreb.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
arch/blackfin/mach-bf561/coreb.c +5 -3
@@ -220,9 +220,10 @@ static int coreb_release(struct inode *inode, struct file *file)return 0 ; } -static int coreb_ioctl (struct inode *inode,struct file *file, -unsigned int cmd,unsigned long arg) +static long coreb_ioctl (struct file *file,unsigned int cmd,unsigned long arg) { +lock_kernel (); +int retval =0 ;int coreb_index =0 ;
@@ -289,6 +290,7 @@ static int coreb_ioctl(struct inode *inode, struct file *file,#endif } +unlock_kernel ();return retval; }
@@ -297,7 +299,7 @@ static struct file_operations coreb_fops = { .llseek = coreb_lseek, .read = coreb_read, .write = coreb_write, - .ioctl = coreb_ioctl, + .unlocked_ioctl = coreb_ioctl, .open = coreb_open, .release = coreb_release };
Signature · 1 line
1.6.2
Could you add some comment for this patch?
Quoted 41 lines · On Tue, 2009-03-24 at 16:12 -0500, [email protected] wrote:
From: Stoyan Gaydarov <[email protected]>
Signed-off-by Stoyan Gaydarov <[email protected]>--- arch/blackfin/mach-bf561/coreb.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)arch/blackfin/mach-bf561/coreb.c +5
-3@@ -220,9 +220,10 @@ static int coreb_release(struct inode *inode, struct file *file)return 0 ; } -static int coreb_ioctl (struct inode *inode,struct file *file, -unsigned int cmd,unsigned long arg) +static long coreb_ioctl (struct file *file,unsigned int cmd,unsigned long arg) { +lock_kernel (); +int retval =0 ;int coreb_index =0 ;@@ -289,6 +290,7 @@ static int coreb_ioctl(struct inode *inode, struct file *file,#endif } +unlock_kernel ();return retval; }@@ -297,7 +299,7 @@ static struct file_operations coreb_fops = { .llseek = coreb_lseek, .read = coreb_read, .write = coreb_write, - .ioctl = coreb_ioctl, + .unlocked_ioctl = coreb_ioctl, .open = coreb_open, .release = coreb_release };
Quoted 16 lines · On Tue, Mar 24, 2009 at 17:12, <[email protected]> wrote:
arch/blackfin/mach-bf561/coreb.c +3
-2@@ -220,9 +220,10 @@ static int coreb_release(struct inode *inode, struct file *file) return 0; } -static int coreb_ioctl (struct inode *inode,struct file *file, - unsigned int cmd, unsigned long arg) +static long coreb_ioctl (struct file *file,unsigned int cmd,unsigned long arg) { + lock_kernel(); + int retval = 0; int coreb_index = 0;
arch/blackfin/mach-bf561/coreb.c static int coreb_ioctl(struct inode *inode, struct file *file, · line 295
Quoted 6 lines
arch/blackfin/mach-bf561/coreb.c +1
-0@@ -289,6 +290,7 @@ static int coreb_ioctl(struct inode *inode, struct file *file, #endif } + unlock_kernel(); return retval; }
there is no need to lock the kernel in here. people have asked in the past and we've told them that it's pointless. simply change it to use unlocked_ioctl.
-mike