Remove unneeded lock_kernel() in driveres/block/loop.c
Subsystems (2)
PATCH 1/1 Remove unneeded lock_kernel() in driveres/block/loop.c
This patch remove the unneeded lock_kernel() in drivers/block/loop.c. I read the code as this lock_kernel() doesn't protect anything. Loopback code use lo_ctl_mutex with syncronization.
drivers/block/loop.c +0 -2
@@ -1286,7 +1286,6 @@ static long lo_compat_ioctl(struct file *file, unsigned int cmd, unsigned long astruct loop_device *lo = inode->i_bdev->bd_disk->private_data;int err; -lock_kernel ();switch (cmd) {case LOOP_SET_STATUS :mutex_lock (&lo->lo_ctl_mutex);
@@ -1312,7 +1311,6 @@ static long lo_compat_ioctl(struct file *file, unsigned int cmd, unsigned long a err = -ENOIOCTLCMD ; break; } -unlock_kernel ();return err; }#endif
Signature · 6 lines
-------------- Diego Woitasen _______________________________________________ Kernel-janitors mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
Re: [KJ] [PATCH] Remove unneeded lock_kernel() in
Quoted 3 lines · Diego Woitasen
This patch remove the unneeded
lock_kernel()indrivers/block/loop.c. I read the code as thislock_kernel()doesn't protect anything. Loopback code uselo_ctl_mutexwith syncronization.
s/as/and/
s/with/for/
:-P
Quoted 31 lines
drivers/block/loop.c +0
-2@@ -1286,7 +1286,6 @@ static long lo_compat_ioctl(struct file *file, unsigned int cmd, unsigned long astruct loop_device *lo = inode->i_bdev->bd_disk->private_data;int err; -lock_kernel ();switch (cmd) {case LOOP_SET_STATUS :mutex_lock (&lo->lo_ctl_mutex);@@ -1312,7 +1311,6 @@ static long lo_compat_ioctl(struct file *file, unsigned int cmd, unsigned long a err = -ENOIOCTLCMD ; break; } -unlock_kernel ();return err; }#endif Signature · 8 lines
-- -------------- Diego Woitasen _______________________________________________ Kernel-janitors mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
Signature · 6 lines
-------------- Diego Woitasen _______________________________________________ Kernel-janitors mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors