Re: [PATCH 04/56] fs: Macros to define splice file_operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 13, 2014 at 10:22 PM, Pieter Smith <pieter@xxxxxxxxxx> wrote:
> Provides a CONFIG_SYSCALL_SPLICE compatible way of defining the .splice_read
> and .splice_write file_operations so that they can later be compiled out when
> the kernel is configured without the splice-family syscalls
>
> Signed-off-by: Pieter Smith <pieter@xxxxxxxxxx>
> ---
>  include/linux/fs.h | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 9418772..a88de9f 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -1512,6 +1512,32 @@ struct file_operations {
>         int (*show_fdinfo)(struct seq_file *m, struct file *f);
>  };
>
> +#ifdef CONFIG_SYSCALL_SPLICE
> +
> +/*
> + * Define and init the splice_read member of a file_operations struct
> + */
> +#define SPLICE_READ_INIT(read) .splice_read = read,
> +
> +/*
> + * Define and init the splice_read member of a file_operations struct
> + */
> +#define SPLICE_WRITE_INIT(write) .splice_write = write,

This is ugly like hell.
Why can't you do something like __exit_p()?

-- 
Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux