Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dd771eb authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

block: remove blk_part_pack_uuid



This helper was only used by IMA of all things, which would get spurious
errors if CONFIG_BLOCK is disabled.  Just opencode the call there.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
Acked-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent d905fdaa
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -219,12 +219,6 @@ static inline struct gendisk *part_to_disk(struct hd_struct *part)
	return NULL;
}

static inline int blk_part_pack_uuid(const u8 *uuid_str, u8 *to)
{
	uuid_be_to_bin(uuid_str, (uuid_be *)to);
	return 0;
}

static inline int disk_max_parts(struct gendisk *disk)
{
	if (disk->flags & GENHD_FL_EXT_DEVT)
@@ -736,11 +730,6 @@ static inline dev_t blk_lookup_devt(const char *name, int partno)
	dev_t devt = MKDEV(0, 0);
	return devt;
}

static inline int blk_part_pack_uuid(const u8 *uuid_str, u8 *to)
{
	return -EINVAL;
}
#endif /* CONFIG_BLOCK */

#endif /* _LINUX_GENHD_H */
+1 −2
Original line number Diff line number Diff line
@@ -717,8 +717,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
				break;
			}

			result = blk_part_pack_uuid(args[0].from,
						    entry->fsuuid);
			result = uuid_parse(args[0].from, (uuid_t *)&entry->fsuuid);
			if (!result)
				entry->flags |= IMA_FSUUID;
			break;