1/*
2 * Copyright 2016, NICTA
3 *
4 * This software may be distributed and modified according to the terms of
5 * the GNU General Public License version 2. Note that NO WARRANTY is provided.
6 * See "LICENSE_GPLv2.txt" for details.
7 *
8 * @TAG(NICTA_GPL)
9 */
10
11#ifndef _WRAP_LINUX_H_
12# define _WRAP_LINUX_H_
13
14#include <adt.h>
15
16#define ext2fs_assert(v) BUG_ON(!(v))
17
18#define ext2fs_err(...) \
19        printk(KERN_ERR __VA_ARGS__)
20
21#define ext2fs_msg(...) \
22        printk(KERN_INFO __VA_ARGS__)
23
24#ifndef EXT2FS_DEBUG
25#define ext2fs_debug(...) \
26        do {} while (0)
27#else
28#define ext2fs_debug(...) \
29        printk(KERN_ERR __VA_ARGS__)
30#endif /* !EXT2FS_DEBUG */
31
32
33static inline struct inode* RCU_I(struct rcu_head *head)
34{
35        return container_of(head, struct inode, i_rcu);
36}
37
38#endif /* _WRAP_LINUX_H_ */
39