linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Hillf Danton <hdanton@sina.com>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Pavel Tatashin <pasha.tatashin@soleen.com>,
	"Reviewed-by : Tyler Hicks" <tyhicks@linux.microsoft.com>,
	linux-block@vger.kernel.org
Subject: [PATCH 1/7] loop: remove the ->ioctl method in loop_func_table
Date: Wed, 18 Aug 2021 08:24:49 +0200	[thread overview]
Message-ID: <20210818062455.211065-2-hch@lst.de> (raw)
In-Reply-To: <20210818062455.211065-1-hch@lst.de>

Never set to anything useful.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/block/cryptoloop.c | 7 -------
 drivers/block/loop.c       | 4 +---
 drivers/block/loop.h       | 3 ---
 3 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/block/cryptoloop.c b/drivers/block/cryptoloop.c
index 3cabc335ae74..8be35d37e379 100644
--- a/drivers/block/cryptoloop.c
+++ b/drivers/block/cryptoloop.c
@@ -154,12 +154,6 @@ cryptoloop_transfer(struct loop_device *lo, int cmd,
 	return err;
 }
 
-static int
-cryptoloop_ioctl(struct loop_device *lo, int cmd, unsigned long arg)
-{
-	return -EINVAL;
-}
-
 static int
 cryptoloop_release(struct loop_device *lo)
 {
@@ -176,7 +170,6 @@ cryptoloop_release(struct loop_device *lo)
 static struct loop_func_table cryptoloop_funcs = {
 	.number = LO_CRYPT_CRYPTOAPI,
 	.init = cryptoloop_init,
-	.ioctl = cryptoloop_ioctl,
 	.transfer = cryptoloop_transfer,
 	.release = cryptoloop_release,
 	.owner = THIS_MODULE
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index fa1c298a8cfb..b0dfea6d4371 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1169,7 +1169,6 @@ loop_set_status_from_info(struct loop_device *lo,
 	if (!xfer)
 		xfer = &none_funcs;
 	lo->transfer = xfer->transfer;
-	lo->ioctl = xfer->ioctl;
 
 	lo->lo_flags = info->lo_flags;
 
@@ -1383,7 +1382,6 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
 
 	loop_release_xfer(lo);
 	lo->transfer = NULL;
-	lo->ioctl = NULL;
 	lo->lo_device = NULL;
 	lo->lo_encryption = NULL;
 	lo->lo_offset = 0;
@@ -1809,7 +1807,7 @@ static int lo_simple_ioctl(struct loop_device *lo, unsigned int cmd,
 		err = loop_set_block_size(lo, arg);
 		break;
 	default:
-		err = lo->ioctl ? lo->ioctl(lo, cmd, arg) : -EINVAL;
+		err = -EINVAL;
 	}
 	mutex_unlock(&lo->lo_mutex);
 	return err;
diff --git a/drivers/block/loop.h b/drivers/block/loop.h
index 1988899db63a..dcde46afc675 100644
--- a/drivers/block/loop.h
+++ b/drivers/block/loop.h
@@ -43,8 +43,6 @@ struct loop_device {
 	struct loop_func_table *lo_encryption;
 	__u32           lo_init[2];
 	kuid_t		lo_key_owner;	/* Who set the key */
-	int		(*ioctl)(struct loop_device *, int cmd, 
-				 unsigned long arg); 
 
 	struct file *	lo_backing_file;
 	struct block_device *lo_device;
@@ -91,7 +89,6 @@ struct loop_func_table {
 	int (*init)(struct loop_device *, const struct loop_info64 *); 
 	/* release is called from loop_unregister_transfer or clr_fd */
 	int (*release)(struct loop_device *); 
-	int (*ioctl)(struct loop_device *, int cmd, unsigned long arg);
 	struct module *owner;
 }; 
 
-- 
2.30.2


  reply	other threads:[~2021-08-18  6:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18  6:24 sort out the lock order in the loop driver Christoph Hellwig
2021-08-18  6:24 ` Christoph Hellwig [this message]
2021-08-18  6:24 ` [PATCH 2/7] loop: return void from the ->release method in loop_func_table Christoph Hellwig
2021-08-18  6:24 ` [PATCH 3/7] loop: merge the cryptoloop module into the main loop module Christoph Hellwig
2021-08-18  6:24 ` [PATCH 4/7] loop: devirtualize transfer transformations Christoph Hellwig
2021-08-18  6:24 ` [PATCH 5/7] loop: remove the unused idx argument to loop_control_get_free Christoph Hellwig
2021-08-18  6:24 ` [PATCH 6/7] loop: move loop device deletion out of loop_ctl_mutex Christoph Hellwig
2021-08-18  6:24 ` [PATCH 7/7] loop: avoid holding loop_ctl_mutex over add_disk Christoph Hellwig
2021-08-18 10:08 ` sort out the lock order in the loop driver Tetsuo Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210818062455.211065-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=hdanton@sina.com \
    --cc=linux-block@vger.kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=tyhicks@linux.microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).