On Apr 13, cattelan@xxxxxxxxxxx wrote:
> First it would be best not to include linux/fs.h in any file
> not in the fs/xfs/linux directory. It will cause headaches.
>
> If fact that linux/xfs_sema.h shouldn't be there either.
>
> If the file is general enough say types.h it can go
> in xfs_os_defs.h; I doesn't really hurt if some
> *.c files include some header files they don't need.
> As long as it doesn't create conflicts.
>
> if you really really need to include fs.h put it
> in xfs_os_defs.h with an
> #ifdef NEED_FS_H wrapper.
> then define it in what ever file that it is needed.
If I were to change this:
#include <xfs_os_defs.h>
#ifdef SIM
#define _KERNEL 1
#define __KERNEL__ 1
#endif
#include <linux/xfs_sema.h>
to this:
#define NEED_XFS_SEMA_H
#include <xfs_os_defs.h>
#ifdef SIM
#define _KERNEL 1
#define __KERNEL__ 1
#endif
it wouldn't do the Right Thing in the SIM case, would it?
-Phil
--
Phil Schwan, Captain Popetastic, Linuxcare Canada
|