nvram: Convert nvram_ioctl to unlocked_ioctl, remove smp_lock.h
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 57 lines · ----- "John Kacur
After removing the BKL from open, we can also convert
nvram_ioctlto anunlocked_ioctl. It has it's onlyspin_lock, and doesn't rely on the BKLThis file no longer uses the BKL so
smp_lock.hcan be removed.Signed-off-by John Kacur <[email protected]>--- drivers/char/nvram.c | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-)drivers/char/nvram.c +8
-10@@ -110,7 +110,6 @@#include <linux/spinlock.h> #include <linux/io.h> #include <linux/uaccess.h> -#include <linux/smp_lock.h> #include <asm/system.h> @@ -297,8 +296,7 @@ checksum_err:return -EIO ; } -static int nvram_ioctl (struct inode *inode,struct file *file, -unsigned int cmd,unsigned long arg) +static long nvram_ioctl (struct file *file,unsigned int cmd,unsigned long arg) {int i;@@ -419,13 +417,13 @@ static int nvram_add_proc_fs(void)#endif /* CONFIG_PROC_FS */ static const struct file_operations nvram_fops = { - .owner =THIS_MODULE , - .llseek = nvram_llseek, - .read = nvram_read, - .write = nvram_write, - .ioctl = nvram_ioctl, - .open = nvram_open, - .release = nvram_release, + .owner =THIS_MODULE , + .llseek = nvram_llseek, + .read = nvram_read, + .write = nvram_write, + .unlocked_ioctl = nvram_ioctl, + .open = nvram_open, + .release = nvram_release, };static struct miscdevice nvram_dev = {Signature · 1 line
1.6.0.6
Sorry for the double send, I must have messed-up something with git-send-email. The --compose failed on me, and that part of the message was lost afaict.
What I wanted to say was, Ingo, in the past you carried nvram fixes, so if no-one objects to this change, can you integrate this one?
This did have a curiosity in the history. It seems that Linus's tree had the remove smp_lock.h patch before the patch to remove BKL hit his tree. So
I combined that little bit with my previous patch that turns this into
an unlocked ioctl. (resend of http://lkml.indiana.edu/hypermail/linux/kernel/0910.2/01608.html)
Thanks
John
Quoted 6 lines · John Kacur
Sorry for the double send, I must have messed-up something with git-send-email. The --compose failed on me, and that part of the message was lost afaict.
What I wanted to say was, Ingo, in the past you carried nvram fixes, so if no-one objects to this change, can you integrate this one?
Note: Just in case, as I don't know if Ingo or Thomas still maintain a kill-bkl tree, I keep this patch somewhere so that if it's not merged in a tree in one week or so, I'll queue it up in mine.
Thanks.
Quoted 5 lines · Frederic Weisbecker
Quoted 4 lines · John Kacur
Sorry for the double send, I must have messed-up something with git-send-email. The --compose failed on me, and that part of the message was lost afaict.
Quoted 9 lines
Quoted 2 lines
What I wanted to say was, Ingo, in the past you carried nvram fixes, so if no-one objects to this change, can you integrate this one?
Note: Just in case, as I don't know if Ingo or Thomas still maintain a kill-bkl tree, I keep this patch somewhere so that if it's not merged in a tree in one week or so, I'll queue it up in mine.
In this particular case, I would like to see it get tip testing though.
Thanks.