Re: [PATCH v2] compat: fs: Generic compat_sys_sendfile implementation

From: Arnd Bergmann
Date: Wed Sep 19 2012 - 07:13:27 EST


On Wednesday 19 September 2012, Catalin Marinas wrote:
>
> This function is used by sparc, powerpc and arm64 for compat support.
> The patch adds a generic implementation which calls do_sendfile()
> directly and avoids set_fs().
>
> The sparc architecture has wrappers for the sign extensions while
> powerpc relies on the compiler to do the this. The patch adds wrappers
> for powerpc to handle the u32->int type conversion.
>
> compat_sys_sendfile64() can be replaced by a sys_sendfile() call since
> compat_loff_t has the same size as off_t on a 64-bit system.
>
> On powerpc, the patch also changes the 64-bit sendfile call from
> sys_sendile64 to sys_sendfile.
>
> Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx>
> Acked-by: David S. Miller <davem@xxxxxxxxxxxxx>
> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/