diff options
| author | Darrick J. Wong <djwong@kernel.org> | 2024-05-21 23:02:32 -0700 |
|---|---|---|
| committer | Chandan Babu R <chandanbabu@kernel.org> | 2024-05-27 15:55:52 +0530 |
| commit | 95b19e2f4e0f730c83910e7f5e4d62ec68c6d862 (patch) | |
| tree | 6b337b312c2d2d49d1bb0efe050c1865b8bbd17b /fs/xfs/xfs_handle.c | |
| parent | 38de567906d95c397d87f292b892686b7ec6fbc3 (diff) | |
xfs: don't open-code u64_to_user_ptr
Don't open-code what the kernel already provides.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_handle.c')
| -rw-r--r-- | fs/xfs/xfs_handle.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/xfs/xfs_handle.c b/fs/xfs/xfs_handle.c index c8785ed59543..a3f16e9b6fe5 100644 --- a/fs/xfs/xfs_handle.c +++ b/fs/xfs/xfs_handle.c @@ -773,11 +773,6 @@ xfs_getparents_expand_lastrec( trace_xfs_getparents_expand_lastrec(gpx->ip, gp, &gpx->context, gpr); } -static inline void __user *u64_to_uptr(u64 val) -{ - return (void __user *)(uintptr_t)val; -} - /* Retrieve the parent pointers for a given inode. */ STATIC int xfs_getparents( @@ -862,7 +857,7 @@ xfs_getparents( ASSERT(gpx->context.firstu <= gpx->gph.gph_request.gp_bufsize); /* Copy the records to userspace. */ - if (copy_to_user(u64_to_uptr(gpx->gph.gph_request.gp_buffer), + if (copy_to_user(u64_to_user_ptr(gpx->gph.gph_request.gp_buffer), gpx->krecords, gpx->context.firstu)) error = -EFAULT; |