2011-03-01 12:37:07

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 2/6 v6] vfs: export do_splice_direct() to modules

From: Miklos Szeredi <[email protected]>

Export do_splice_direct() to modules. Needed by overlay filesystem.

Signed-off-by: Miklos Szeredi <[email protected]>
---
fs/splice.c | 1 +
1 file changed, 1 insertion(+)

Index: linux-2.6/fs/splice.c
===================================================================
--- linux-2.6.orig/fs/splice.c 2011-02-22 11:04:39.000000000 +0100
+++ linux-2.6/fs/splice.c 2011-03-01 12:18:16.000000000 +0100
@@ -1296,6 +1296,7 @@ long do_splice_direct(struct file *in, l

return ret;
}
+EXPORT_SYMBOL(do_splice_direct);

static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe,
struct pipe_inode_info *opipe,

--


2011-03-01 15:49:12

by Richard Weinberger

[permalink] [raw]
Subject: Re: [PATCH 2/6 v6] vfs: export do_splice_direct() to modules

Miklos,

On Tue, Mar 1, 2011 at 1:36 PM, Miklos Szeredi <[email protected]> wrote:
> From: Miklos Szeredi <[email protected]>
>
> Export do_splice_direct() to modules. ?Needed by overlay filesystem.
>
> Signed-off-by: Miklos Szeredi <[email protected]>
> ---
> ?fs/splice.c | ? ?1 +
> ?1 file changed, 1 insertion(+)
>
> Index: linux-2.6/fs/splice.c
> ===================================================================
> --- linux-2.6.orig/fs/splice.c ?2011-02-22 11:04:39.000000000 +0100
> +++ linux-2.6/fs/splice.c ? ? ? 2011-03-01 12:18:16.000000000 +0100
> @@ -1296,6 +1296,7 @@ long do_splice_direct(struct file *in, l
>
> ? ? ? ?return ret;
> ?}
> +EXPORT_SYMBOL(do_splice_direct);

I have a question on your patch, why are you using EXPORT_SYMBOL()
instead of EXPORT_SYMBOL_GPL()?
Are you using EXPORT_SYMBOL() because all symbols in fs/splice.c
are exported via EXPORT_SYMBOL()?

To be more precise, are there any rules to decide when _GPL() should be used?
IMHO we should always use _GPL() for new symbols.

> ?static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct pipe_inode_info *opipe,
>
> --
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at ?http://www.tux.org/lkml/
>

--
Thanks,
//richard

2011-03-02 12:43:54

by Miklos Szeredi

[permalink] [raw]
Subject: Re: [PATCH 2/6 v6] vfs: export do_splice_direct() to modules

On Tue, 1 Mar 2011, richard -rw- weinberger wrote:
> > +EXPORT_SYMBOL(do_splice_direct);
>
> I have a question on your patch, why are you using EXPORT_SYMBOL()
> instead of EXPORT_SYMBOL_GPL()?
> Are you using EXPORT_SYMBOL() because all symbols in fs/splice.c
> are exported via EXPORT_SYMBOL()?
>
> To be more precise, are there any rules to decide when _GPL() should be used?
> IMHO we should always use _GPL() for new symbols.

I don't think there are any written rules.

I'd use EXPORT_SYMBOL() when the provided API is reasonably "clean"
(i.e. it hides the implementation well enough).

Thanks,
Miklos