diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-18 17:17:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-18 17:17:12 -0700 |
commit | 0bb73e42f027db64054fff4c3b3203c1626b9dc1 (patch) | |
tree | 2318d7db9d1cc315d51d8d263f66579aaf8c13d2 /include | |
parent | f60c55a94e1d127186566f06294f2dadd966e9b4 (diff) | |
parent | a0753c29004f4983e303abce019f29e183b1ee48 (diff) | |
download | linux-0bb73e42f027db64054fff4c3b3203c1626b9dc1.tar.bz2 |
Merge tag 'afs-next-20190915' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
Pull AFS updates from David Howells:
"Here's a set of patches for AFS. The first three are trivial, deleting
unused symbols and rolling out a wrapper function.
The fourth and fifth patches make use of the previously added RCU-safe
request_key facility to allow afs_permission() and afs_d_revalidate()
to attempt to operate without dropping out of RCU-mode pathwalk. Under
certain conditions, such as conflict with another client, we still
have to drop out anyway, take a lock and consult the server"
* tag 'afs-next-20190915' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
afs: Support RCU pathwalk
afs: Provide an RCU-capable key lookup
afs: Use afs_extract_discard() rather than iov_iter_discard()
afs: remove unused variable 'afs_zero_fid'
afs: remove unused variable 'afs_voltypes'
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/key.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index 50028338a4cc..6cf8e71cf8b7 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -324,7 +324,7 @@ static inline struct key *request_key(struct key_type *type, } #ifdef CONFIG_NET -/* +/** * request_key_net - Request a key for a net namespace and wait for construction * @type: Type of key. * @description: The searchable description of the key. @@ -341,6 +341,18 @@ static inline struct key *request_key(struct key_type *type, */ #define request_key_net(type, description, net, callout_info) \ request_key_tag(type, description, net->key_domain, callout_info); + +/** + * request_key_net_rcu - Request a key for a net namespace under RCU conditions + * @type: Type of key. + * @description: The searchable description of the key. + * @net: The network namespace that is the key's domain of operation. + * + * As for request_key_rcu() except that only keys that operate the specified + * network namespace are used. + */ +#define request_key_net_rcu(type, description, net) \ + request_key_rcu(type, description, net->key_domain); #endif /* CONFIG_NET */ extern int wait_for_key_construction(struct key *key, bool intr); |