diff mbox series

[07/10] fs: Use a void pointer to store fiemap_extent

Message ID 20181205091728.29903-8-cmaiolino@redhat.com (mailing list archive)
State New, archived
Headers show
Series New ->fiemap infrastructure and ->bmap removal | expand

Commit Message

Carlos Maiolino Dec. 5, 2018, 9:17 a.m. UTC
Once fieinfo will carry either a kernel pointer or a user pointer for
holding struct fiemap_extent location , use a void pointer to hold its
address.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
 include/linux/fs.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Christoph Hellwig Jan. 14, 2019, 4:53 p.m. UTC | #1
>  	u64		fi_len;
>  	unsigned int	fi_extents_mapped;	/* Number of mapped extents */
>  	unsigned int	fi_extents_max;		/* Size of fiemap_extent array */
> -	struct		fiemap_extent __user *fi_extents_start;	/* Start of
> -								   fiemap_extent
> -								   array */
> +	void		*fi_extents_start;	/* Start of fiemap_extent
> +						   array */

I think this patch should be merged into the one passing the callback
as it is logically related.  I'd also rename fi_extents_start to
fi_cb_data to make the relation clear.
diff mbox series

Patch

diff --git a/include/linux/fs.h b/include/linux/fs.h
index a7ca228bd191..16a58dfe09cc 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1701,9 +1701,8 @@  struct fiemap_extent_info {
 	u64		fi_len;
 	unsigned int	fi_extents_mapped;	/* Number of mapped extents */
 	unsigned int	fi_extents_max;		/* Size of fiemap_extent array */
-	struct		fiemap_extent __user *fi_extents_start;	/* Start of
-								   fiemap_extent
-								   array */
+	void		*fi_extents_start;	/* Start of fiemap_extent
+						   array */
 };
 int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
 			    u64 phys, u64 len, u32 flags);