diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-10-15 06:29:03 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-04-02 06:29:47 -0400 |
commit | 97e961fdbf32488b7386c9f1effa2bee97d47929 (patch) | |
tree | fa006f5e803e532c9781d4f5f6e34cf9d8382814 /fs/udf/udfdecl.h | |
parent | 5ca4e4be841e389d7d17833fef7be2359f290163 (diff) |
Fix the udf code not to pass structs on stack where possible.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/udfdecl.h')
-rw-r--r-- | fs/udf/udfdecl.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h index 35f0b9bf7b0c..9a2a9b61413e 100644 --- a/fs/udf/udfdecl.h +++ b/fs/udf/udfdecl.h | |||
@@ -62,8 +62,6 @@ static inline size_t udf_ext0_offset(struct inode *inode) | |||
62 | return 0; | 62 | return 0; |
63 | } | 63 | } |
64 | 64 | ||
65 | #define udf_get_lb_pblock(sb,loc,offset) udf_get_pblock((sb), (loc).logicalBlockNum, (loc).partitionReferenceNum, (offset)) | ||
66 | |||
67 | /* computes tag checksum */ | 65 | /* computes tag checksum */ |
68 | u8 udf_tag_checksum(const struct tag *t); | 66 | u8 udf_tag_checksum(const struct tag *t); |
69 | 67 | ||
@@ -124,7 +122,7 @@ extern int udf_ioctl(struct inode *, struct file *, unsigned int, | |||
124 | unsigned long); | 122 | unsigned long); |
125 | 123 | ||
126 | /* inode.c */ | 124 | /* inode.c */ |
127 | extern struct inode *udf_iget(struct super_block *, struct kernel_lb_addr); | 125 | extern struct inode *udf_iget(struct super_block *, struct kernel_lb_addr *); |
128 | extern int udf_sync_inode(struct inode *); | 126 | extern int udf_sync_inode(struct inode *); |
129 | extern void udf_expand_file_adinicb(struct inode *, int, int *); | 127 | extern void udf_expand_file_adinicb(struct inode *, int, int *); |
130 | extern struct buffer_head *udf_expand_dir_adinicb(struct inode *, int *, int *); | 128 | extern struct buffer_head *udf_expand_dir_adinicb(struct inode *, int *, int *); |
@@ -140,9 +138,9 @@ extern int udf_extend_file(struct inode *, struct extent_position *, | |||
140 | extern int8_t inode_bmap(struct inode *, sector_t, struct extent_position *, | 138 | extern int8_t inode_bmap(struct inode *, sector_t, struct extent_position *, |
141 | struct kernel_lb_addr *, uint32_t *, sector_t *); | 139 | struct kernel_lb_addr *, uint32_t *, sector_t *); |
142 | extern int8_t udf_add_aext(struct inode *, struct extent_position *, | 140 | extern int8_t udf_add_aext(struct inode *, struct extent_position *, |
143 | struct kernel_lb_addr, uint32_t, int); | 141 | struct kernel_lb_addr *, uint32_t, int); |
144 | extern int8_t udf_write_aext(struct inode *, struct extent_position *, | 142 | extern int8_t udf_write_aext(struct inode *, struct extent_position *, |
145 | struct kernel_lb_addr, uint32_t, int); | 143 | struct kernel_lb_addr *, uint32_t, int); |
146 | extern int8_t udf_delete_aext(struct inode *, struct extent_position, | 144 | extern int8_t udf_delete_aext(struct inode *, struct extent_position, |
147 | struct kernel_lb_addr, uint32_t); | 145 | struct kernel_lb_addr, uint32_t); |
148 | extern int8_t udf_next_aext(struct inode *, struct extent_position *, | 146 | extern int8_t udf_next_aext(struct inode *, struct extent_position *, |
@@ -160,7 +158,7 @@ extern struct genericFormat *udf_get_extendedattr(struct inode *, uint32_t, | |||
160 | extern struct buffer_head *udf_read_tagged(struct super_block *, uint32_t, | 158 | extern struct buffer_head *udf_read_tagged(struct super_block *, uint32_t, |
161 | uint32_t, uint16_t *); | 159 | uint32_t, uint16_t *); |
162 | extern struct buffer_head *udf_read_ptagged(struct super_block *, | 160 | extern struct buffer_head *udf_read_ptagged(struct super_block *, |
163 | struct kernel_lb_addr, uint32_t, | 161 | struct kernel_lb_addr *, uint32_t, |
164 | uint16_t *); | 162 | uint16_t *); |
165 | extern void udf_update_tag(char *, int); | 163 | extern void udf_update_tag(char *, int); |
166 | extern void udf_new_tag(char *, uint16_t, uint16_t, uint16_t, uint32_t, int); | 164 | extern void udf_new_tag(char *, uint16_t, uint16_t, uint16_t, uint32_t, int); |
@@ -182,6 +180,14 @@ extern uint32_t udf_get_pblock_meta25(struct super_block *, uint32_t, uint16_t, | |||
182 | uint32_t); | 180 | uint32_t); |
183 | extern int udf_relocate_blocks(struct super_block *, long, long *); | 181 | extern int udf_relocate_blocks(struct super_block *, long, long *); |
184 | 182 | ||
183 | static inline uint32_t | ||
184 | udf_get_lb_pblock(struct super_block *sb, struct kernel_lb_addr *loc, | ||
185 | uint32_t offset) | ||
186 | { | ||
187 | return udf_get_pblock(sb, loc->logicalBlockNum, | ||
188 | loc->partitionReferenceNum, offset); | ||
189 | } | ||
190 | |||
185 | /* unicode.c */ | 191 | /* unicode.c */ |
186 | extern int udf_get_filename(struct super_block *, uint8_t *, uint8_t *, int); | 192 | extern int udf_get_filename(struct super_block *, uint8_t *, uint8_t *, int); |
187 | extern int udf_put_filename(struct super_block *, const uint8_t *, uint8_t *, | 193 | extern int udf_put_filename(struct super_block *, const uint8_t *, uint8_t *, |
@@ -200,7 +206,7 @@ extern void udf_truncate_extents(struct inode *); | |||
200 | 206 | ||
201 | /* balloc.c */ | 207 | /* balloc.c */ |
202 | extern void udf_free_blocks(struct super_block *, struct inode *, | 208 | extern void udf_free_blocks(struct super_block *, struct inode *, |
203 | struct kernel_lb_addr, uint32_t, uint32_t); | 209 | struct kernel_lb_addr *, uint32_t, uint32_t); |
204 | extern int udf_prealloc_blocks(struct super_block *, struct inode *, uint16_t, | 210 | extern int udf_prealloc_blocks(struct super_block *, struct inode *, uint16_t, |
205 | uint32_t, uint32_t); | 211 | uint32_t, uint32_t); |
206 | extern int udf_new_block(struct super_block *, struct inode *, uint16_t, | 212 | extern int udf_new_block(struct super_block *, struct inode *, uint16_t, |