From: cem@kernel.org
To: kzak@redhat.com
Cc: util-linux@vger.kernel.org, zkabelac@redhat.com, amulhern@redhat.com
Subject: [PATCH RFC 2/2] Revert "libblkid: check for private DM device before open"
Date: Wed, 8 Apr 2026 12:35:26 +0200 [thread overview]
Message-ID: <20260408103538.134308-3-cem@kernel.org> (raw)
In-Reply-To: <20260408103538.134308-1-cem@kernel.org>
From: Carlos Maiolino <cem@kernel.org>
This reverts commit d05a84b22e549527cbcbcc7d5efc6bad06668170.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
libblkid/src/probe.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
index d47c22c72043..60af2915c0d7 100644
--- a/libblkid/src/probe.c
+++ b/libblkid/src/probe.c
@@ -216,18 +216,8 @@ blkid_probe blkid_new_probe_from_filename(const char *filename)
{
int fd;
blkid_probe pr = NULL;
- struct stat sb;
-
- /*
- * Check for private device-mapper devices (LVM internals, etc.)
- * before open() to avoid bumping the kernel open count. A racing
- * DM_DEVICE_REMOVE would otherwise see EBUSY.
- */
- if (stat(filename, &sb) == 0 && S_ISBLK(sb.st_mode) &&
- sysfs_devno_is_dm_private(sb.st_rdev, NULL))
- return NULL;
- fd = open(filename, O_RDONLY | O_CLOEXEC | O_NONBLOCK);
+ fd = open(filename, O_RDONLY|O_CLOEXEC|O_NONBLOCK);
if (fd < 0)
return NULL;
--
2.53.0
next prev parent reply other threads:[~2026-04-08 10:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 10:35 [PATCH RFC 0/2] Fix API breakage in libblkid cem
2026-04-08 10:35 ` [PATCH RFC 1/2] Revert "libblkid: add debug message for private DM device skip" cem
2026-04-08 10:35 ` cem [this message]
2026-04-08 11:47 ` [PATCH RFC 0/2] Fix API breakage in libblkid Zdenek Kabelac
2026-04-08 13:19 ` Carlos Maiolino
2026-04-08 13:32 ` Zdenek Kabelac
2026-04-08 14:49 ` Carlos Maiolino
2026-04-08 15:10 ` Zdenek Kabelac
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=20260408103538.134308-3-cem@kernel.org \
--to=cem@kernel.org \
--cc=amulhern@redhat.com \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
--cc=zkabelac@redhat.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