aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/udfdecl.h
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2008-10-15 06:29:03 -0400
committerJan Kara <jack@suse.cz>2009-04-02 06:29:47 -0400
commit97e961fdbf32488b7386c9f1effa2bee97d47929 (patch)
treefa006f5e803e532c9781d4f5f6e34cf9d8382814 /fs/udf/udfdecl.h
parent5ca4e4be841e389d7d17833fef7be2359f290163 (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.h20
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 */
68u8 udf_tag_checksum(const struct tag *t); 66u8 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 */
127extern struct inode *udf_iget(struct super_block *, struct kernel_lb_addr); 125extern struct inode *udf_iget(struct super_block *, struct kernel_lb_addr *);
128extern int udf_sync_inode(struct inode *); 126extern int udf_sync_inode(struct inode *);
129extern void udf_expand_file_adinicb(struct inode *, int, int *); 127extern void udf_expand_file_adinicb(struct inode *, int, int *);
130extern struct buffer_head *udf_expand_dir_adinicb(struct inode *, int *, int *); 128extern 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 *,
140extern int8_t inode_bmap(struct inode *, sector_t, struct extent_position *, 138extern 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 *);
142extern int8_t udf_add_aext(struct inode *, struct extent_position *, 140extern 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);
144extern int8_t udf_write_aext(struct inode *, struct extent_position *, 142extern 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);
146extern int8_t udf_delete_aext(struct inode *, struct extent_position, 144extern int8_t udf_delete_aext(struct inode *, struct extent_position,
147 struct kernel_lb_addr, uint32_t); 145 struct kernel_lb_addr, uint32_t);
148extern int8_t udf_next_aext(struct inode *, struct extent_position *, 146extern int8_t udf_next_aext(struct inode *, struct extent_position *,
@@ -160,7 +158,7 @@ extern struct genericFormat *udf_get_extendedattr(struct inode *, uint32_t,
160extern struct buffer_head *udf_read_tagged(struct super_block *, uint32_t, 158extern struct buffer_head *udf_read_tagged(struct super_block *, uint32_t,
161 uint32_t, uint16_t *); 159 uint32_t, uint16_t *);
162extern struct buffer_head *udf_read_ptagged(struct super_block *, 160extern 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 *);
165extern void udf_update_tag(char *, int); 163extern void udf_update_tag(char *, int);
166extern void udf_new_tag(char *, uint16_t, uint16_t, uint16_t, uint32_t, int); 164extern 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);
183extern int udf_relocate_blocks(struct super_block *, long, long *); 181extern int udf_relocate_blocks(struct super_block *, long, long *);
184 182
183static inline uint32_t
184udf_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 */
186extern int udf_get_filename(struct super_block *, uint8_t *, uint8_t *, int); 192extern int udf_get_filename(struct super_block *, uint8_t *, uint8_t *, int);
187extern int udf_put_filename(struct super_block *, const uint8_t *, uint8_t *, 193extern 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 */
202extern void udf_free_blocks(struct super_block *, struct inode *, 208extern 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);
204extern int udf_prealloc_blocks(struct super_block *, struct inode *, uint16_t, 210extern int udf_prealloc_blocks(struct super_block *, struct inode *, uint16_t,
205 uint32_t, uint32_t); 211 uint32_t, uint32_t);
206extern int udf_new_block(struct super_block *, struct inode *, uint16_t, 212extern int udf_new_block(struct super_block *, struct inode *, uint16_t,