Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1654424

[PATCH 15/24] block: remove blk_part_pack_uuid

From Christoph Hellwig <hch@lst.de>
Newsgroups linux.kernel
Subject [PATCH 15/24] block: remove blk_part_pack_uuid
Date 2017-05-31 18:30 +0200
Message-ID <tNeFs-7az-25@gated-at.bofh.it> (permalink)
References <tNevL-77a-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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               | 11 -----------
 security/integrity/ima/ima_policy.c |  3 +--
 2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index acff9437e5c3..e619fae2f037 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -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 */
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index 3ab1067db624..49fbc3e8f012 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -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_to_bin(args[0].from, (uuid_t *)&entry->fsuuid);
 			if (!result)
 				entry->flags |= IMA_FSUUID;
 			break;
-- 
2.11.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

cleanup UUID types V6 Christoph Hellwig <hch@lst.de> - 2017-05-31 18:20 +0200
  [PATCH 02/24] xfs: use uuid_copy() helper to abstract uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-31 18:20 +0200
  [PATCH 07/24] nfsd: namespace-prefix uuid_parse Christoph Hellwig <hch@lst.de> - 2017-05-31 18:20 +0200
  [PATCH 01/24] uuid,afs: move struct uuid_v1 back into afs Christoph Hellwig <hch@lst.de> - 2017-05-31 18:20 +0200
    Re: [PATCH 01/24] uuid,afs: move struct uuid_v1 back into afs David Howells <dhowells@redhat.com> - 2017-05-31 20:30 +0200
  [PATCH 06/24] uuid: rename uuid types Christoph Hellwig <hch@lst.de> - 2017-05-31 18:20 +0200
  [PATCH 09/24] uuid: don't export guid_index and uuid_index Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 10/24] uuid: hoist helpers uuid_equal() and uuid_copy() from xfs Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 18/24] overlayfs: use uuid_t instead of uuid_be Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 12/24] S390/sysinfo: use uuid_is_null instead of opencoding it Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 11/24] uuid: hoist uuid_is_null() helper from libnvdimm Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 16/24] ima/policy: switch to use uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 24/24] MAINTAINERS: add uuid entry Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 19/24] partitions/ldm: switch to use uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 15/24] block: remove blk_part_pack_uuid Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
    Re: [PATCH 15/24] block: remove blk_part_pack_uuid Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-05-31 20:20 +0200
      Re: [PATCH 15/24] block: remove blk_part_pack_uuid Christoph Hellwig <hch@lst.de> - 2017-05-31 21:40 +0200
  [PATCH 23/24] tmpfs: generate random sb->s_uuid Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 17/24] fs: switch ->s_uuid to uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 13/24] xfs: remove uuid_getnodeuniq and xfs_uu_t Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 21/24] nvme: switch to uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 14/24] xfs: use the common helper uuid_is_null() Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 20/24] sysctl: switch to use uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 08/24] uuid: rename uuid_to_bin to uuid_parse Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
    Re: [PATCH 08/24] uuid: rename uuid_to_bin to uuid_parse Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-05-31 20:20 +0200
      Re: [PATCH 08/24] uuid: rename uuid_to_bin to uuid_parse Christoph Hellwig <hch@lst.de> - 2017-05-31 21:50 +0200
  [PATCH 22/24] scsi_debug: switch to uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200
  [PATCH 05/24] uuid: remove uuid_be defintions from the uapi header Christoph Hellwig <hch@lst.de> - 2017-05-31 18:30 +0200

csiph-web