diff mbox series

[3/5] libxfs: remove the S_ISREG check from blkid_get_topology

Message ID 171338844409.1856006.11959435247152441667.stgit@frogsfrogsfrogs (mailing list archive)
State Accepted
Headers show
Series [1/5] libxfs: remove the unused fs_topology_t typedef | expand

Commit Message

Darrick J. Wong April 17, 2024, 9:41 p.m. UTC
From: Christoph Hellwig <hch@lst.de>

The only caller already performs the exact same check.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 libxfs/topology.c |    9 ---------
 1 file changed, 9 deletions(-)
diff mbox series

Patch

diff --git a/libxfs/topology.c b/libxfs/topology.c
index 63f0b96a5..706eed022 100644
--- a/libxfs/topology.c
+++ b/libxfs/topology.c
@@ -178,15 +178,6 @@  blkid_get_topology(
 {
 	blkid_topology tp;
 	blkid_probe pr;
-	struct stat statbuf;
-
-	/* can't get topology info from a file */
-	if (!stat(device, &statbuf) && S_ISREG(statbuf.st_mode)) {
-		fprintf(stderr,
-	_("%s: Warning: trying to probe topology of a file %s!\n"),
-			progname, device);
-		return;
-	}
 
 	pr = blkid_new_probe_from_filename(device);
 	if (!pr)