Re: [PATCH] i2c: Push ioctl BKL down into the i2c code

From: Stefan Richter
Date: Fri May 23 2008 - 14:09:00 EST


Jean Delvare wrote:
On Fri, 23 May 2008 10:46:30 +0200, Stefan Richter wrote:
AFAIU it's a preparation for

--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ ?? @@ struct file_operations {
unsigned int (*poll) (struct file *, struct poll_table_struct *);
- int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);

Obvious benefits:
- No new .ioctl()s.

I fail to see how this is related to the locking change.

I meant: After struct file_operations.ioctl is removed, developers can only implement unlocked_ioctl methods. This includes code that is not (yet) in mainline. To keep it compilable, it has to be converted to unlocked_ioctl.

[The quickest kind of conversion is to replace the ioctl method by an unlocked_ioctl method which itself takes the BKL. This kind of conversion has of course no direct benefit for the functioning of the kernel, but as mentioned it at least puts the BKL issue into the line of sight of the people who work with the code.]
--
Stefan Richter
-=====-==--- -=-= =-===
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/