]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
block: remove blk_part_pack_uuid
authorChristoph Hellwig <hch@lst.de>
Wed, 10 May 2017 13:16:44 +0000 (15:16 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 5 Jun 2017 14:59:10 +0000 (16:59 +0200)
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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
include/linux/genhd.h
security/integrity/ima/ima_policy.c

index acff9437e5c3776e48a9357af40291165719416d..e619fae2f0375e073e5f3216fd764676ae1340b8 100644 (file)
@@ -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 */
index 3ab1067db624d860f9303a5e3ea8587ebbed699b..1431ada649e54a24fd751cd9766f66b428c16658 100644 (file)
@@ -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;