aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/balloc.c21
-rw-r--r--fs/ext4/ext4.h26
-rw-r--r--fs/ext4/ext4_jbd2.c7
-rw-r--r--fs/ext4/ext4_jbd2.h4
-rw-r--r--fs/ext4/file.c2
-rw-r--r--fs/ext4/inline.c10
-rw-r--r--fs/ext4/inode.c2
-rw-r--r--fs/ext4/mmp.c4
-rw-r--r--fs/ext4/super.c4
9 files changed, 26 insertions, 54 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 59c3ba8bb8ea..0762d143e252 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -83,9 +83,9 @@ static inline int ext4_block_in_group(struct super_block *sb,
83/* Return the number of clusters used for file system metadata; this 83/* Return the number of clusters used for file system metadata; this
84 * represents the overhead needed by the file system. 84 * represents the overhead needed by the file system.
85 */ 85 */
86unsigned ext4_num_overhead_clusters(struct super_block *sb, 86static unsigned ext4_num_overhead_clusters(struct super_block *sb,
87 ext4_group_t block_group, 87 ext4_group_t block_group,
88 struct ext4_group_desc *gdp) 88 struct ext4_group_desc *gdp)
89{ 89{
90 unsigned num_clusters; 90 unsigned num_clusters;
91 int block_cluster = -1, inode_cluster = -1, itbl_cluster = -1, i, c; 91 int block_cluster = -1, inode_cluster = -1, itbl_cluster = -1, i, c;
@@ -176,9 +176,10 @@ static unsigned int num_clusters_in_group(struct super_block *sb,
176} 176}
177 177
178/* Initializes an uninitialized block bitmap */ 178/* Initializes an uninitialized block bitmap */
179void ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, 179static void ext4_init_block_bitmap(struct super_block *sb,
180 ext4_group_t block_group, 180 struct buffer_head *bh,
181 struct ext4_group_desc *gdp) 181 ext4_group_t block_group,
182 struct ext4_group_desc *gdp)
182{ 183{
183 unsigned int bit, bit_max; 184 unsigned int bit, bit_max;
184 struct ext4_sb_info *sbi = EXT4_SB(sb); 185 struct ext4_sb_info *sbi = EXT4_SB(sb);
@@ -351,10 +352,10 @@ static ext4_fsblk_t ext4_valid_block_bitmap(struct super_block *sb,
351 return 0; 352 return 0;
352} 353}
353 354
354void ext4_validate_block_bitmap(struct super_block *sb, 355static void ext4_validate_block_bitmap(struct super_block *sb,
355 struct ext4_group_desc *desc, 356 struct ext4_group_desc *desc,
356 ext4_group_t block_group, 357 ext4_group_t block_group,
357 struct buffer_head *bh) 358 struct buffer_head *bh)
358{ 359{
359 ext4_fsblk_t blk; 360 ext4_fsblk_t blk;
360 struct ext4_group_info *grp = ext4_get_group_info(sb, block_group); 361 struct ext4_group_info *grp = ext4_get_group_info(sb, block_group);
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 4feb2d5819ae..1479e2ae00d2 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1956,10 +1956,6 @@ extern void ext4_get_group_no_and_offset(struct super_block *sb,
1956extern ext4_group_t ext4_get_group_number(struct super_block *sb, 1956extern ext4_group_t ext4_get_group_number(struct super_block *sb,
1957 ext4_fsblk_t block); 1957 ext4_fsblk_t block);
1958 1958
1959extern void ext4_validate_block_bitmap(struct super_block *sb,
1960 struct ext4_group_desc *desc,
1961 ext4_group_t block_group,
1962 struct buffer_head *bh);
1963extern unsigned int ext4_block_group(struct super_block *sb, 1959extern unsigned int ext4_block_group(struct super_block *sb,
1964 ext4_fsblk_t blocknr); 1960 ext4_fsblk_t blocknr);
1965extern ext4_grpblk_t ext4_block_group_offset(struct super_block *sb, 1961extern ext4_grpblk_t ext4_block_group_offset(struct super_block *sb,
@@ -1988,16 +1984,9 @@ extern int ext4_wait_block_bitmap(struct super_block *sb,
1988 struct buffer_head *bh); 1984 struct buffer_head *bh);
1989extern struct buffer_head *ext4_read_block_bitmap(struct super_block *sb, 1985extern struct buffer_head *ext4_read_block_bitmap(struct super_block *sb,
1990 ext4_group_t block_group); 1986 ext4_group_t block_group);
1991extern void ext4_init_block_bitmap(struct super_block *sb,
1992 struct buffer_head *bh,
1993 ext4_group_t group,
1994 struct ext4_group_desc *desc);
1995extern unsigned ext4_free_clusters_after_init(struct super_block *sb, 1987extern unsigned ext4_free_clusters_after_init(struct super_block *sb,
1996 ext4_group_t block_group, 1988 ext4_group_t block_group,
1997 struct ext4_group_desc *gdp); 1989 struct ext4_group_desc *gdp);
1998extern unsigned ext4_num_overhead_clusters(struct super_block *sb,
1999 ext4_group_t block_group,
2000 struct ext4_group_desc *gdp);
2001ext4_fsblk_t ext4_inode_to_goal_block(struct inode *); 1990ext4_fsblk_t ext4_inode_to_goal_block(struct inode *);
2002 1991
2003/* dir.c */ 1992/* dir.c */
@@ -2140,8 +2129,6 @@ extern int ext4_alloc_da_blocks(struct inode *inode);
2140extern void ext4_set_aops(struct inode *inode); 2129extern void ext4_set_aops(struct inode *inode);
2141extern int ext4_writepage_trans_blocks(struct inode *); 2130extern int ext4_writepage_trans_blocks(struct inode *);
2142extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks); 2131extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks);
2143extern int ext4_block_truncate_page(handle_t *handle,
2144 struct address_space *mapping, loff_t from);
2145extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode, 2132extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode,
2146 loff_t lstart, loff_t lend); 2133 loff_t lstart, loff_t lend);
2147extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf); 2134extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf);
@@ -2201,8 +2188,6 @@ extern int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count);
2201 2188
2202/* super.c */ 2189/* super.c */
2203extern int ext4_calculate_overhead(struct super_block *sb); 2190extern int ext4_calculate_overhead(struct super_block *sb);
2204extern int ext4_superblock_csum_verify(struct super_block *sb,
2205 struct ext4_super_block *es);
2206extern void ext4_superblock_csum_set(struct super_block *sb); 2191extern void ext4_superblock_csum_set(struct super_block *sb);
2207extern void *ext4_kvmalloc(size_t size, gfp_t flags); 2192extern void *ext4_kvmalloc(size_t size, gfp_t flags);
2208extern void *ext4_kvzalloc(size_t size, gfp_t flags); 2193extern void *ext4_kvzalloc(size_t size, gfp_t flags);
@@ -2574,19 +2559,11 @@ extern const struct file_operations ext4_dir_operations;
2574extern const struct inode_operations ext4_file_inode_operations; 2559extern const struct inode_operations ext4_file_inode_operations;
2575extern const struct file_operations ext4_file_operations; 2560extern const struct file_operations ext4_file_operations;
2576extern loff_t ext4_llseek(struct file *file, loff_t offset, int origin); 2561extern loff_t ext4_llseek(struct file *file, loff_t offset, int origin);
2577extern void ext4_unwritten_wait(struct inode *inode);
2578 2562
2579/* inline.c */ 2563/* inline.c */
2580extern int ext4_has_inline_data(struct inode *inode); 2564extern int ext4_has_inline_data(struct inode *inode);
2581extern int ext4_get_inline_size(struct inode *inode);
2582extern int ext4_get_max_inline_size(struct inode *inode); 2565extern int ext4_get_max_inline_size(struct inode *inode);
2583extern int ext4_find_inline_data_nolock(struct inode *inode); 2566extern int ext4_find_inline_data_nolock(struct inode *inode);
2584extern void ext4_write_inline_data(struct inode *inode,
2585 struct ext4_iloc *iloc,
2586 void *buffer, loff_t pos,
2587 unsigned int len);
2588extern int ext4_prepare_inline_data(handle_t *handle, struct inode *inode,
2589 unsigned int len);
2590extern int ext4_init_inline_data(handle_t *handle, struct inode *inode, 2567extern int ext4_init_inline_data(handle_t *handle, struct inode *inode,
2591 unsigned int len); 2568 unsigned int len);
2592extern int ext4_destroy_inline_data(handle_t *handle, struct inode *inode); 2569extern int ext4_destroy_inline_data(handle_t *handle, struct inode *inode);
@@ -2779,9 +2756,6 @@ extern int ext4_bio_write_page(struct ext4_io_submit *io,
2779 2756
2780/* mmp.c */ 2757/* mmp.c */
2781extern int ext4_multi_mount_protect(struct super_block *, ext4_fsblk_t); 2758extern int ext4_multi_mount_protect(struct super_block *, ext4_fsblk_t);
2782extern void ext4_mmp_csum_set(struct super_block *sb, struct mmp_struct *mmp);
2783extern int ext4_mmp_csum_verify(struct super_block *sb,
2784 struct mmp_struct *mmp);
2785 2759
2786/* 2760/*
2787 * Note that these flags will never ever appear in a buffer_head's state flag. 2761 * Note that these flags will never ever appear in a buffer_head's state flag.
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c
index c3fb607413ed..0074e0d23d6e 100644
--- a/fs/ext4/ext4_jbd2.c
+++ b/fs/ext4/ext4_jbd2.c
@@ -122,9 +122,10 @@ handle_t *__ext4_journal_start_reserved(handle_t *handle, unsigned int line,
122 return handle; 122 return handle;
123} 123}
124 124
125void ext4_journal_abort_handle(const char *caller, unsigned int line, 125static void ext4_journal_abort_handle(const char *caller, unsigned int line,
126 const char *err_fn, struct buffer_head *bh, 126 const char *err_fn,
127 handle_t *handle, int err) 127 struct buffer_head *bh,
128 handle_t *handle, int err)
128{ 129{
129 char nbuf[16]; 130 char nbuf[16];
130 const char *errstr = ext4_decode_error(NULL, err, nbuf); 131 const char *errstr = ext4_decode_error(NULL, err, nbuf);
diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h
index 81cfefa9dc0c..17c00ff202f2 100644
--- a/fs/ext4/ext4_jbd2.h
+++ b/fs/ext4/ext4_jbd2.h
@@ -231,10 +231,6 @@ int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode);
231/* 231/*
232 * Wrapper functions with which ext4 calls into JBD. 232 * Wrapper functions with which ext4 calls into JBD.
233 */ 233 */
234void ext4_journal_abort_handle(const char *caller, unsigned int line,
235 const char *err_fn,
236 struct buffer_head *bh, handle_t *handle, int err);
237
238int __ext4_journal_get_write_access(const char *where, unsigned int line, 234int __ext4_journal_get_write_access(const char *where, unsigned int line,
239 handle_t *handle, struct buffer_head *bh); 235 handle_t *handle, struct buffer_head *bh);
240 236
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 7d55a591deba..2389c4e71bf8 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -57,7 +57,7 @@ static int ext4_release_file(struct inode *inode, struct file *filp)
57 return 0; 57 return 0;
58} 58}
59 59
60void ext4_unwritten_wait(struct inode *inode) 60static void ext4_unwritten_wait(struct inode *inode)
61{ 61{
62 wait_queue_head_t *wq = ext4_ioend_wq(inode); 62 wait_queue_head_t *wq = ext4_ioend_wq(inode);
63 63
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 82edf5b93352..33dd704d16bd 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -22,7 +22,7 @@
22#define EXT4_INLINE_DOTDOT_OFFSET 2 22#define EXT4_INLINE_DOTDOT_OFFSET 2
23#define EXT4_INLINE_DOTDOT_SIZE 4 23#define EXT4_INLINE_DOTDOT_SIZE 4
24 24
25int ext4_get_inline_size(struct inode *inode) 25static int ext4_get_inline_size(struct inode *inode)
26{ 26{
27 if (EXT4_I(inode)->i_inline_off) 27 if (EXT4_I(inode)->i_inline_off)
28 return EXT4_I(inode)->i_inline_size; 28 return EXT4_I(inode)->i_inline_size;
@@ -211,8 +211,8 @@ out:
211 * value since it is already handled by ext4_xattr_ibody_inline_set. 211 * value since it is already handled by ext4_xattr_ibody_inline_set.
212 * That saves us one memcpy. 212 * That saves us one memcpy.
213 */ 213 */
214void ext4_write_inline_data(struct inode *inode, struct ext4_iloc *iloc, 214static void ext4_write_inline_data(struct inode *inode, struct ext4_iloc *iloc,
215 void *buffer, loff_t pos, unsigned int len) 215 void *buffer, loff_t pos, unsigned int len)
216{ 216{
217 struct ext4_xattr_entry *entry; 217 struct ext4_xattr_entry *entry;
218 struct ext4_xattr_ibody_header *header; 218 struct ext4_xattr_ibody_header *header;
@@ -373,8 +373,8 @@ out:
373 return error; 373 return error;
374} 374}
375 375
376int ext4_prepare_inline_data(handle_t *handle, struct inode *inode, 376static int ext4_prepare_inline_data(handle_t *handle, struct inode *inode,
377 unsigned int len) 377 unsigned int len)
378{ 378{
379 int ret, size; 379 int ret, size;
380 struct ext4_inode_info *ei = EXT4_I(inode); 380 struct ext4_inode_info *ei = EXT4_I(inode);
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 04dd2de10796..574c6dda95d8 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3443,7 +3443,7 @@ unlock:
3443 * This required during truncate. We need to physically zero the tail end 3443 * This required during truncate. We need to physically zero the tail end
3444 * of that block so it doesn't yield old data if the file is later grown. 3444 * of that block so it doesn't yield old data if the file is later grown.
3445 */ 3445 */
3446int ext4_block_truncate_page(handle_t *handle, 3446static int ext4_block_truncate_page(handle_t *handle,
3447 struct address_space *mapping, loff_t from) 3447 struct address_space *mapping, loff_t from)
3448{ 3448{
3449 unsigned offset = from & (PAGE_CACHE_SIZE-1); 3449 unsigned offset = from & (PAGE_CACHE_SIZE-1);
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c
index 04434ad3e8e0..32bce844c2e1 100644
--- a/fs/ext4/mmp.c
+++ b/fs/ext4/mmp.c
@@ -18,7 +18,7 @@ static __le32 ext4_mmp_csum(struct super_block *sb, struct mmp_struct *mmp)
18 return cpu_to_le32(csum); 18 return cpu_to_le32(csum);
19} 19}
20 20
21int ext4_mmp_csum_verify(struct super_block *sb, struct mmp_struct *mmp) 21static int ext4_mmp_csum_verify(struct super_block *sb, struct mmp_struct *mmp)
22{ 22{
23 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb, 23 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
24 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) 24 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
@@ -27,7 +27,7 @@ int ext4_mmp_csum_verify(struct super_block *sb, struct mmp_struct *mmp)
27 return mmp->mmp_checksum == ext4_mmp_csum(sb, mmp); 27 return mmp->mmp_checksum == ext4_mmp_csum(sb, mmp);
28} 28}
29 29
30void ext4_mmp_csum_set(struct super_block *sb, struct mmp_struct *mmp) 30static void ext4_mmp_csum_set(struct super_block *sb, struct mmp_struct *mmp)
31{ 31{
32 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb, 32 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
33 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) 33 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e38dd7d37a69..b26a3959c8dd 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -138,8 +138,8 @@ static __le32 ext4_superblock_csum(struct super_block *sb,
138 return cpu_to_le32(csum); 138 return cpu_to_le32(csum);
139} 139}
140 140
141int ext4_superblock_csum_verify(struct super_block *sb, 141static int ext4_superblock_csum_verify(struct super_block *sb,
142 struct ext4_super_block *es) 142 struct ext4_super_block *es)
143{ 143{
144 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb, 144 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
145 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) 145 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))