Skip to contentSkip to conversation

jffs2: eliminate BKL on ioctl

PATCH New Alan Cox 1 participant 1 message May 22, 2008 Journalling flash file system V2 (JFFS2)

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 jffs2: eliminate BKL on ioctl

As the ioctl does nothing right now its easy to get the locking right 8)

fs/jffs2/dir.c +4 -4
index c0c141f..dd784df 100644
@@ -36,10 +36,10 @@ static int jffs2_rename (struct inode *, struct dentry *,
 
 const struct file_operations jffs2_dir_operations =
 {
-	.read =		generic_read_dir,
-	.readdir =	jffs2_readdir,
-	.ioctl =	jffs2_ioctl,
-	.fsync =	jffs2_fsync
+	.read		=	generic_read_dir,
+	.readdir	=	jffs2_readdir,
+	.unlocked_ioctl =	jffs2_ioctl,
+	.fsync		=	jffs2_fsync
 };
 
 
fs/jffs2/file.c +1 -1
index 5e92034..5b298b9 100644
@@ -46,7 +46,7 @@ const struct file_operations jffs2_file_operations =
  	.aio_read =	generic_file_aio_read,
  	.write =	do_sync_write,
  	.aio_write =	generic_file_aio_write,
-	.ioctl =	jffs2_ioctl,
+	.unlocked_ioctl = jffs2_ioctl,
 	.mmap =		generic_file_readonly_mmap,
 	.fsync =	jffs2_fsync,
 	.splice_read =	generic_file_splice_read,
fs/jffs2/ioctl.c +1 -2
index e217721..9d41f43 100644
@@ -12,8 +12,7 @@
 #include <linux/fs.h>
 #include "nodelist.h"
 
-int jffs2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
-		unsigned long arg)
+long jffs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
 	/* Later, this will provide for lsattr.jffs2 and chattr.jffs2, which
 	   will include compression support etc. */
fs/jffs2/os-linux.h +1 -1
index 2cc866c..5e194a5 100644
@@ -167,7 +167,7 @@ int jffs2_fsync(struct file *, struct dentry *, int);
 int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg);
 
 /* ioctl.c */
-int jffs2_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
+long jffs2_ioctl(struct file *, unsigned int, unsigned long);
 
 /* symlink.c */
 extern const struct inode_operations jffs2_symlink_inode_operations;