Thread (108 messages) flat view 108 messages, 9 authors, 2023-10-02

Re: [PATCH 02/29] block: Use bdev_open_by_dev() in blkdev_open()

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2023-08-25 02:29:32
Also in: linux-fsdevel

On Wed, Aug 23, 2023 at 12:48:13PM +0200, Jan Kara wrote:
quoted hunk ↗ jump to hunk
diff --git a/block/ioctl.c b/block/ioctl.c
index 648670ddb164..54c1e2f71031 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -582,7 +582,8 @@ long blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
 {
 	struct block_device *bdev = I_BDEV(file->f_mapping->host);
 	void __user *argp = (void __user *)arg;
-	blk_mode_t mode = file_to_blk_mode(file);
+	struct bdev_handle *bdev_handle = file->private_data;
+	blk_mode_t mode = bdev_handle->mode;
 	int ret;
 
 	switch (cmd) {
	Still the same bug as in v2 - you are missing the effects of
fcntl(2) setting/clearing O_NDELAY and sd_ioctl() is sensitive to that.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help