Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1638999
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 13/16] block: remove blk_part_pack_uuid |
| Date | 2017-05-10 20:10 +0200 |
| Message-ID | <tFEdI-40t-29@gated-at.bofh.it> (permalink) |
| References | <tFEdH-40t-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
include/linux/genhd.h | 11 -----------
security/integrity/ima/ima_policy.c | 6 ++----
2 files changed, 2 insertions(+), 15 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..4d1178610145 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -717,10 +717,8 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
break;
}
- result = blk_part_pack_uuid(args[0].from,
- entry->fsuuid);
- if (!result)
- entry->flags |= IMA_FSUUID;
+ uuid_to_bin(args[0].from, (uuid_t *)entry->fsuuid);
+ entry->flags |= IMA_FSUUID;
break;
case Opt_uid_gt:
case Opt_euid_gt:
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
cleanup UUID types Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
[PATCH 04/16] uuid: don't export guid_index and uuid_index Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
[PATCH 03/16] uuid: rename uuid types Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
Re: [PATCH 03/16] uuid: rename uuid types David Howells <dhowells@redhat.com> - 2017-05-10 20:30 +0200
Re: [PATCH 03/16] uuid: rename uuid types Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-05-11 13:40 +0200
Re: [PATCH 03/16] uuid: rename uuid types Amir Goldstein <amir73il@gmail.com> - 2017-05-10 21:20 +0200
Re: [PATCH 03/16] uuid: rename uuid types Christoph Hellwig <hch@lst.de> - 2017-05-11 10:00 +0200
Re: [PATCH 03/16] uuid: rename uuid types Amir Goldstein <amir73il@gmail.com> - 2017-05-11 10:40 +0200
[PATCH 02/16] xfs: use uuid_be to implement the uuid_t type Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
[PATCH 06/16] afs: switch to use uuid_t and uuid_gen Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
Re: [PATCH 06/16] afs: switch to use uuid_t and uuid_gen David Howells <dhowells@redhat.com> - 2017-05-10 20:30 +0200
[PATCH 16/16] fs: switch ->s_uuid to uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
Re: [PATCH 16/16] fs: switch ->s_uuid to uuid_t Amir Goldstein <amir73il@gmail.com> - 2017-05-10 21:10 +0200
Re: [PATCH 16/16] fs: switch ->s_uuid to uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-11 10:00 +0200
[PATCH 13/16] block: remove blk_part_pack_uuid Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
[PATCH 14/16] block: remove blk_part_pack_uuid Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
Re: [PATCH 14/16] block: remove blk_part_pack_uuid Christoph Hellwig <hch@lst.de> - 2017-05-10 20:20 +0200
[PATCH 05/16] uuid: add the v1 layout to uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
Re: [PATCH 05/16] uuid: add the v1 layout to uuid_t David Howells <dhowells@redhat.com> - 2017-05-10 20:30 +0200
Re: [PATCH 05/16] uuid: add the v1 layout to uuid_t Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-05-11 13:50 +0200
Re: [PATCH 05/16] uuid: add the v1 layout to uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-11 14:10 +0200
[PATCH 01/16] xfs: use uuid_copy() helper to abstract uuid_t Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
[PATCH 09/16] md: namespace private helper names Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
[PATCH 12/16] xfs: use the common helper uuid_is_null() Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
[PATCH 08/16] xfs: remove uuid_getnodeuniq and xfs_uu_t Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
[PATCH 10/16] uuid: hoist helpers uuid_equal() and uuid_copy() from xfs Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
[PATCH 11/16] uuid: hoist uuid_is_null() helper from libnvdimm Christoph Hellwig <hch@lst.de> - 2017-05-10 20:10 +0200
csiph-web