diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-09-15 20:25:47 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-11-25 13:01:55 -0500 |
commit | de4eda9de2d957ef2d6a8365a01e26a435e958cb (patch) | |
tree | 49b0d60dedb65af7f0d3e874ee9c661e6b09697b /security | |
parent | a41dad905e5a388f88435a517de102e9b2c8e43d (diff) |
use less confusing names for iov_iter direction initializers
READ/WRITE proved to be actively confusing - the meanings are
"data destination, as used with read(2)" and "data source, as
used with write(2)", but people keep interpreting those as
"we read data from it" and "we write data to it", i.e. exactly
the wrong way.
Call them ITER_DEST and ITER_SOURCE - at least that is harder
to misinterpret...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security')
-rw-r--r-- | security/keys/keyctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 96a92a645216..d54f73c558f7 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c @@ -1251,7 +1251,7 @@ long keyctl_instantiate_key(key_serial_t id, struct iov_iter from; int ret; - ret = import_single_range(WRITE, (void __user *)_payload, plen, + ret = import_single_range(ITER_SOURCE, (void __user *)_payload, plen, &iov, &from); if (unlikely(ret)) return ret; @@ -1283,7 +1283,7 @@ long keyctl_instantiate_key_iov(key_serial_t id, if (!_payload_iov) ioc = 0; - ret = import_iovec(WRITE, _payload_iov, ioc, + ret = import_iovec(ITER_SOURCE, _payload_iov, ioc, ARRAY_SIZE(iovstack), &iov, &from); if (ret < 0) return ret; |