[Ocfs2-devel] [PATCH 01/10] ocfs2: Handle workqueue changes

Sunil Mushran sunil.mushran at oracle.com
Wed Nov 11 10:11:30 PST 2009


Joel Becker wrote:
> 	Rather than include kapi-compat/include/workqueue.h at all
> times, I'd really like to only include it when necessary.  That way you
> can build the driver against mainline even when there is no kapi-compat
> directory.
> 	Can't we have an fs/ocfs2/kapi-default.h that has defines for
> when we're against mainline?  Include it from fs/ocfs2/ocfs2.h.  For
> this patch, it would include:
>
> #ifndef KAPI_INIT_WORK
> typedef struct work_struct kapi_work_struct_t;
> # define work_to_object(a, b, c)		container_of(a, b, c)
> # define KAPI_INIT_WORK(a, b, c)		INIT_WORK(a, b)
> # define KAPI_INIT_DELAYED_WORK(a, b, c)	INIT_DELAYED_WORK(a, b)
> #endif
>   

Yeah, that's a good idea.



More information about the Ocfs2-devel mailing list