Skip to content

Commit e17f7a0

Browse files
Christoph Hellwigdjbw
authored andcommitted
uio: remove copy_from_iter_flushcache() and copy_mc_to_iter()
These two wrappers are never used. Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent de291b5 commit e17f7a0

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

drivers/nvdimm/pmem.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,7 @@ static long pmem_dax_direct_access(struct dax_device *dax_dev,
302302
}
303303

304304
/*
305-
* Use the 'no check' versions of copy_from_iter_flushcache() and
306-
* copy_mc_to_iter() to bypass HARDENED_USERCOPY overhead. Bounds
307-
* checking, both file offset and device offset, is handled by
305+
* Bounds checking, both file offset and device offset, is handled by
308306
* dax_iomap_actor()
309307
*/
310308
static size_t pmem_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff,

include/linux/uio.h

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ bool copy_from_iter_full_nocache(void *addr, size_t bytes, struct iov_iter *i)
196196
#ifdef CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE
197197
/*
198198
* Note, users like pmem that depend on the stricter semantics of
199-
* copy_from_iter_flushcache() than copy_from_iter_nocache() must check for
199+
* _copy_from_iter_flushcache() than _copy_from_iter_nocache() must check for
200200
* IS_ENABLED(CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE) before assuming that the
201201
* destination is flushed from the cache on return.
202202
*/
@@ -211,24 +211,6 @@ size_t _copy_mc_to_iter(const void *addr, size_t bytes, struct iov_iter *i);
211211
#define _copy_mc_to_iter _copy_to_iter
212212
#endif
213213

214-
static __always_inline __must_check
215-
size_t copy_from_iter_flushcache(void *addr, size_t bytes, struct iov_iter *i)
216-
{
217-
if (unlikely(!check_copy_size(addr, bytes, false)))
218-
return 0;
219-
else
220-
return _copy_from_iter_flushcache(addr, bytes, i);
221-
}
222-
223-
static __always_inline __must_check
224-
size_t copy_mc_to_iter(void *addr, size_t bytes, struct iov_iter *i)
225-
{
226-
if (unlikely(!check_copy_size(addr, bytes, true)))
227-
return 0;
228-
else
229-
return _copy_mc_to_iter(addr, bytes, i);
230-
}
231-
232214
size_t iov_iter_zero(size_t bytes, struct iov_iter *);
233215
unsigned long iov_iter_alignment(const struct iov_iter *i);
234216
unsigned long iov_iter_gap_alignment(const struct iov_iter *i);

0 commit comments

Comments
 (0)