diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2015-02-02 10:15:24 -0500 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-05-27 19:39:54 +0200 |
| commit | 839e08a8616db66c7afdf630cb5fb4700889ea86 (patch) | |
| tree | 432648a297b388d414372450b23117065ebd11a3 | |
| parent | b1ee983df95f89e501762fc2dbd9353803316d29 (diff) | |
Add missing definitions for PTR_ERR_OR_ZERO() and NEED_KEY_SEARCH
These definitions are needed for the ext4 encryption patches
Change-Id: Ib4254abadaeaf234f8539834f481c24dc93233eb
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@google.com>
| -rw-r--r-- | include/linux/err.h | 3 | ||||
| -rw-r--r-- | include/linux/key.h | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/err.h b/include/linux/err.h index f2edce25a..9b8c28d66 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -60,6 +60,9 @@ static inline int __must_check PTR_RET(const void *ptr) return 0; } +/* for backport */ +#define PTR_ERR_OR_ZERO(p) PTR_RET(p) + #endif #endif /* _LINUX_ERR_H */ diff --git a/include/linux/key.h b/include/linux/key.h index 4dfde1161..b2752c35f 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -72,6 +72,15 @@ struct key; #define KEY_PERM_UNDEF 0xffffffff +/* New permission defines for backport */ +#define KEY_NEED_VIEW 0x01 /* Require permission to view attributes */ +#define KEY_NEED_READ 0x02 /* Require permission to read content */ +#define KEY_NEED_WRITE 0x04 /* Require permission to update / modify */ +#define KEY_NEED_SEARCH 0x08 /* Require permission to search (keyring) or find (key) */ +#define KEY_NEED_LINK 0x10 /* Require permission to link */ +#define KEY_NEED_SETATTR 0x20 /* Require permission to change attributes */ +#define KEY_NEED_ALL 0x3f /* All the above permissions */ + struct seq_file; struct user_struct; struct signal_struct; |
