diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-05-22 21:59:25 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-08-09 05:37:15 +0300 |
commit | fcb14cb1bdacec5b4374fe161e83fb8208164a85 (patch) | |
tree | 06b308b8f6b67c65e0c1e90d2e97e61ae66f232a /fs/ceph/file.c | |
parent | fa9db655d0e112c108fe838809608caf759bdf5e (diff) | |
download | linux-fcb14cb1bdacec5b4374fe161e83fb8208164a85.tar.xz |
new iov_iter flavour - ITER_UBUF
Equivalent of single-segment iovec. Initialized by iov_iter_ubuf(),
checked for by iter_is_ubuf(), otherwise behaves like ITER_IOVEC
ones.
We are going to expose the things like ->write_iter() et.al. to those
in subsequent commits.
New predicate (user_backed_iter()) that is true for ITER_IOVEC and
ITER_UBUF; places like direct-IO handling should use that for
checking that pages we modify after getting them from iov_iter_get_pages()
would need to be dirtied.
DO NOT assume that replacing iter_is_iovec() with user_backed_iter()
will solve all problems - there's code that uses iter_is_iovec() to
decide how to poke around in iov_iter guts and for that the predicate
replacement obviously won't suffice.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r-- | fs/ceph/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index da59e836a06e..c535de5852bf 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -1262,7 +1262,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter, size_t count = iov_iter_count(iter); loff_t pos = iocb->ki_pos; bool write = iov_iter_rw(iter) == WRITE; - bool should_dirty = !write && iter_is_iovec(iter); + bool should_dirty = !write && user_backed_iter(iter); if (write && ceph_snap(file_inode(file)) != CEPH_NOSNAP) return -EROFS; |