diff options
author | Jaswinder Singh Rajput <jaswinderrajput@gmail.com> | 2009-02-03 09:10:03 -0500 |
---|---|---|
committer | Jaswinder Singh Rajput <jaswinderrajput@gmail.com> | 2009-02-03 09:10:03 -0500 |
commit | 750e1c18251345e662bb7e7062b5fd5c1ade36de (patch) | |
tree | d3a1a2270033444c9fa369d88a1abb311ae0cedd /include/linux | |
parent | 5007b1fc4ef2c1b496536b2f026353c1d44d92ef (diff) |
headers_check fix cleanup: linux/reiserfs_fs.h
Only REISERFS_IOC_* definitions are required for user space
rest should be in #ifdef __KERNEL__ as pointed by Arnd Bergmann.
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/reiserfs_fs.h | 62 |
1 files changed, 28 insertions, 34 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index a4db55fd1f65..e356c99f0659 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -28,8 +28,6 @@ | |||
28 | #include <linux/reiserfs_fs_sb.h> | 28 | #include <linux/reiserfs_fs_sb.h> |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | struct fid; | ||
32 | |||
33 | /* | 31 | /* |
34 | * include/linux/reiser_fs.h | 32 | * include/linux/reiser_fs.h |
35 | * | 33 | * |
@@ -37,6 +35,33 @@ struct fid; | |||
37 | * | 35 | * |
38 | */ | 36 | */ |
39 | 37 | ||
38 | /* ioctl's command */ | ||
39 | #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) | ||
40 | /* define following flags to be the same as in ext2, so that chattr(1), | ||
41 | lsattr(1) will work with us. */ | ||
42 | #define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS | ||
43 | #define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS | ||
44 | #define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION | ||
45 | #define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION | ||
46 | |||
47 | #ifdef __KERNEL__ | ||
48 | /* the 32 bit compat definitions with int argument */ | ||
49 | #define REISERFS_IOC32_UNPACK _IOW(0xCD, 1, int) | ||
50 | #define REISERFS_IOC32_GETFLAGS FS_IOC32_GETFLAGS | ||
51 | #define REISERFS_IOC32_SETFLAGS FS_IOC32_SETFLAGS | ||
52 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION | ||
53 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION | ||
54 | |||
55 | /* Locking primitives */ | ||
56 | /* Right now we are still falling back to (un)lock_kernel, but eventually that | ||
57 | would evolve into real per-fs locks */ | ||
58 | #define reiserfs_write_lock( sb ) lock_kernel() | ||
59 | #define reiserfs_write_unlock( sb ) unlock_kernel() | ||
60 | |||
61 | /* xattr stuff */ | ||
62 | #define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem) | ||
63 | struct fid; | ||
64 | |||
40 | /* in reading the #defines, it may help to understand that they employ | 65 | /* in reading the #defines, it may help to understand that they employ |
41 | the following abbreviations: | 66 | the following abbreviations: |
42 | 67 | ||
@@ -698,9 +723,8 @@ static inline void cpu_key_k_offset_dec(struct cpu_key *key) | |||
698 | /* object identifier for root dir */ | 723 | /* object identifier for root dir */ |
699 | #define REISERFS_ROOT_OBJECTID 2 | 724 | #define REISERFS_ROOT_OBJECTID 2 |
700 | #define REISERFS_ROOT_PARENT_OBJECTID 1 | 725 | #define REISERFS_ROOT_PARENT_OBJECTID 1 |
701 | #ifdef __KERNEL__ | 726 | |
702 | extern struct reiserfs_key root_key; | 727 | extern struct reiserfs_key root_key; |
703 | #endif /* __KERNEL__ */ | ||
704 | 728 | ||
705 | /* | 729 | /* |
706 | * Picture represents a leaf of the S+tree | 730 | * Picture represents a leaf of the S+tree |
@@ -1008,12 +1032,10 @@ struct reiserfs_de_head { | |||
1008 | #define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) | 1032 | #define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) |
1009 | #define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) | 1033 | #define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) |
1010 | 1034 | ||
1011 | #ifdef __KERNEL__ | ||
1012 | extern void make_empty_dir_item_v1(char *body, __le32 dirid, __le32 objid, | 1035 | extern void make_empty_dir_item_v1(char *body, __le32 dirid, __le32 objid, |
1013 | __le32 par_dirid, __le32 par_objid); | 1036 | __le32 par_dirid, __le32 par_objid); |
1014 | extern void make_empty_dir_item(char *body, __le32 dirid, __le32 objid, | 1037 | extern void make_empty_dir_item(char *body, __le32 dirid, __le32 objid, |
1015 | __le32 par_dirid, __le32 par_objid); | 1038 | __le32 par_dirid, __le32 par_objid); |
1016 | #endif /* __KERNEL__ */ | ||
1017 | 1039 | ||
1018 | /* array of the entry headers */ | 1040 | /* array of the entry headers */ |
1019 | /* get item body */ | 1041 | /* get item body */ |
@@ -1482,9 +1504,7 @@ struct item_operations { | |||
1482 | void (*print_vi) (struct virtual_item * vi); | 1504 | void (*print_vi) (struct virtual_item * vi); |
1483 | }; | 1505 | }; |
1484 | 1506 | ||
1485 | #ifdef __KERNEL__ | ||
1486 | extern struct item_operations *item_ops[TYPE_ANY + 1]; | 1507 | extern struct item_operations *item_ops[TYPE_ANY + 1]; |
1487 | #endif /* __KERNEL__ */ | ||
1488 | 1508 | ||
1489 | #define op_bytes_number(ih,bsize) item_ops[le_ih_k_type (ih)]->bytes_number (ih, bsize) | 1509 | #define op_bytes_number(ih,bsize) item_ops[le_ih_k_type (ih)]->bytes_number (ih, bsize) |
1490 | #define op_is_left_mergeable(key,bsize) item_ops[le_key_k_type (le_key_version (key), key)]->is_left_mergeable (key, bsize) | 1510 | #define op_is_left_mergeable(key,bsize) item_ops[le_key_k_type (le_key_version (key), key)]->is_left_mergeable (key, bsize) |
@@ -1546,7 +1566,6 @@ struct reiserfs_iget_args { | |||
1546 | /* FUNCTION DECLARATIONS */ | 1566 | /* FUNCTION DECLARATIONS */ |
1547 | /***************************************************************************/ | 1567 | /***************************************************************************/ |
1548 | 1568 | ||
1549 | /*#ifdef __KERNEL__*/ | ||
1550 | #define get_journal_desc_magic(bh) (bh->b_data + bh->b_size - 12) | 1569 | #define get_journal_desc_magic(bh) (bh->b_data + bh->b_size - 12) |
1551 | 1570 | ||
1552 | #define journal_trans_half(blocksize) \ | 1571 | #define journal_trans_half(blocksize) \ |
@@ -1685,7 +1704,6 @@ struct reiserfs_transaction_handle { | |||
1685 | struct list_head t_list; | 1704 | struct list_head t_list; |
1686 | }; | 1705 | }; |
1687 | 1706 | ||
1688 | #ifdef __KERNEL__ | ||
1689 | /* used to keep track of ordered and tail writes, attached to the buffer | 1707 | /* used to keep track of ordered and tail writes, attached to the buffer |
1690 | * head through b_journal_head. | 1708 | * head through b_journal_head. |
1691 | */ | 1709 | */ |
@@ -2185,30 +2203,6 @@ long reiserfs_compat_ioctl(struct file *filp, | |||
2185 | unsigned int cmd, unsigned long arg); | 2203 | unsigned int cmd, unsigned long arg); |
2186 | int reiserfs_unpack(struct inode *inode, struct file *filp); | 2204 | int reiserfs_unpack(struct inode *inode, struct file *filp); |
2187 | 2205 | ||
2188 | /* ioctl's command */ | ||
2189 | #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) | ||
2190 | /* define following flags to be the same as in ext2, so that chattr(1), | ||
2191 | lsattr(1) will work with us. */ | ||
2192 | #define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS | ||
2193 | #define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS | ||
2194 | #define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION | ||
2195 | #define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION | ||
2196 | |||
2197 | /* the 32 bit compat definitions with int argument */ | ||
2198 | #define REISERFS_IOC32_UNPACK _IOW(0xCD, 1, int) | ||
2199 | #define REISERFS_IOC32_GETFLAGS FS_IOC32_GETFLAGS | ||
2200 | #define REISERFS_IOC32_SETFLAGS FS_IOC32_SETFLAGS | ||
2201 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION | ||
2202 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION | ||
2203 | |||
2204 | /* Locking primitives */ | ||
2205 | /* Right now we are still falling back to (un)lock_kernel, but eventually that | ||
2206 | would evolve into real per-fs locks */ | ||
2207 | #define reiserfs_write_lock( sb ) lock_kernel() | ||
2208 | #define reiserfs_write_unlock( sb ) unlock_kernel() | ||
2209 | |||
2210 | /* xattr stuff */ | ||
2211 | #define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem) | ||
2212 | 2206 | ||
2213 | #endif /* __KERNEL__ */ | 2207 | #endif /* __KERNEL__ */ |
2214 | #endif /* _LINUX_REISER_FS_H */ | 2208 | #endif /* _LINUX_REISER_FS_H */ |