From: Ian Rogers <irogers@google.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Finn Thain <fthain@linux-m68k.org>,
Nathan Chancellor <nathan@kernel.org>,
linux-block@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
llvm@lists.linux.dev, linux-kernel@vger.kernel.org,
Ian Rogers <irogers@google.com>
Subject: [PATCH] swim3: Set .owner = THIS_MODULE in floppy_fops
Date: Thu, 3 Dec 2026 09:14:04 -0800 [thread overview]
Message-ID: <20261203171404.435213-1-irogers@google.com> (raw)
bdev_open() calls try_module_get(disk->fops->owner) and bdev_release()
calls module_put(disk->fops->owner). swim3 can be built as a module
(CONFIG_MAC_FLOPPY), though it currently lacks a module_exit() handler.
Set .owner = THIS_MODULE in floppy_fops for consistency with other
block_device_operations definitions and to prepare for annotating
struct block_device_operations::owner with Clang's
require_explicit_initialization attribute.
Signed-off-by: Ian Rogers <irogers@google.com>
---
Note: Found using Clang's require_explicit_initialization attribute;
an AI coding assistant helped audit call sites, verify Fixes commits,
and draft the changelog.
drivers/block/swim3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index a03de4c4d35f..898a5e642c80 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -1068,6 +1068,7 @@ static int floppy_revalidate(struct gendisk *disk)
}
static const struct block_device_operations floppy_fops = {
+ .owner = THIS_MODULE,
.open = floppy_unlocked_open,
.release = floppy_release,
.ioctl = floppy_ioctl,
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
--
2.56.1.839.g22a8290db9-goog
reply other threads:[~2026-12-03 17:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261203171404.435213-1-irogers@google.com \
--to=irogers@google.com \
--cc=axboe@kernel.dk \
--cc=fthain@linux-m68k.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=llvm@lists.linux.dev \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
/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