OSDN Git Service

security: pfk: fix build when ecryptfs is disabled
authorEric Biggers <ebiggers@google.com>
Wed, 25 Jan 2017 23:17:01 +0000 (15:17 -0800)
committerArian <arian.kulmer@web.de>
Tue, 19 Nov 2019 14:49:06 +0000 (15:49 +0100)
To avoid compile errors and warnings when the pfk module is enabled
without ecryptfs, the ecryptfs stubs need to be static inline.

Bug: 34712722
Change-Id: I39d715fcac1ff2f7781230cc2d1da2a8d803e974
Signed-off-by: Eric Biggers <ebiggers@google.com>
include/linux/ecryptfs.h

index 489b99e..0f0b664 100644 (file)
@@ -158,7 +158,7 @@ static inline int ecryptfs_register_to_events(
        return 1; /* dummy handle */
 }
 
-static int ecryptfs_unregister_from_events(int user_handle)
+static inline int ecryptfs_unregister_from_events(int user_handle)
 {
        return 0;
 }
@@ -189,13 +189,14 @@ static inline bool ecryptfs_cipher_match(const void *ecrytpfs_data,
        return false;
 }
 
-bool ecryptfs_is_page_in_metadata(const void *ecrytpfs_data, pgoff_t offset)
+static inline bool ecryptfs_is_page_in_metadata(const void *ecrytpfs_data,
+                                               pgoff_t offset)
 {
        return false;
 }
 
-bool ecryptfs_is_data_equal(const void *ecrytpfs_data1,
-               const void *ecrytpfs_data2)
+static inline bool ecryptfs_is_data_equal(const void *ecrytpfs_data1,
+                                         const void *ecrytpfs_data2)
 {
        return false;
 }