diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/balloc.c | 21 | ||||
-rw-r--r-- | fs/ext4/ext4.h | 26 | ||||
-rw-r--r-- | fs/ext4/ext4_jbd2.c | 7 | ||||
-rw-r--r-- | fs/ext4/ext4_jbd2.h | 4 | ||||
-rw-r--r-- | fs/ext4/file.c | 2 | ||||
-rw-r--r-- | fs/ext4/inline.c | 10 | ||||
-rw-r--r-- | fs/ext4/inode.c | 2 | ||||
-rw-r--r-- | fs/ext4/mmp.c | 4 | ||||
-rw-r--r-- | fs/ext4/super.c | 4 |
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 | */ |
86 | unsigned ext4_num_overhead_clusters(struct super_block *sb, | 86 | static 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 */ |
179 | void ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, | 179 | static 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 | ||
354 | void ext4_validate_block_bitmap(struct super_block *sb, | 355 | static 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, | |||
1956 | extern ext4_group_t ext4_get_group_number(struct super_block *sb, | 1956 | extern ext4_group_t ext4_get_group_number(struct super_block *sb, |
1957 | ext4_fsblk_t block); | 1957 | ext4_fsblk_t block); |
1958 | 1958 | ||
1959 | extern 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); | ||
1963 | extern unsigned int ext4_block_group(struct super_block *sb, | 1959 | extern unsigned int ext4_block_group(struct super_block *sb, |
1964 | ext4_fsblk_t blocknr); | 1960 | ext4_fsblk_t blocknr); |
1965 | extern ext4_grpblk_t ext4_block_group_offset(struct super_block *sb, | 1961 | extern 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); |
1989 | extern struct buffer_head *ext4_read_block_bitmap(struct super_block *sb, | 1985 | extern struct buffer_head *ext4_read_block_bitmap(struct super_block *sb, |
1990 | ext4_group_t block_group); | 1986 | ext4_group_t block_group); |
1991 | extern 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); | ||
1995 | extern unsigned ext4_free_clusters_after_init(struct super_block *sb, | 1987 | extern 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); |
1998 | extern unsigned ext4_num_overhead_clusters(struct super_block *sb, | ||
1999 | ext4_group_t block_group, | ||
2000 | struct ext4_group_desc *gdp); | ||
2001 | ext4_fsblk_t ext4_inode_to_goal_block(struct inode *); | 1990 | ext4_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); | |||
2140 | extern void ext4_set_aops(struct inode *inode); | 2129 | extern void ext4_set_aops(struct inode *inode); |
2141 | extern int ext4_writepage_trans_blocks(struct inode *); | 2130 | extern int ext4_writepage_trans_blocks(struct inode *); |
2142 | extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks); | 2131 | extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks); |
2143 | extern int ext4_block_truncate_page(handle_t *handle, | ||
2144 | struct address_space *mapping, loff_t from); | ||
2145 | extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode, | 2132 | extern 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); |
2147 | extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf); | 2134 | extern 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 */ |
2203 | extern int ext4_calculate_overhead(struct super_block *sb); | 2190 | extern int ext4_calculate_overhead(struct super_block *sb); |
2204 | extern int ext4_superblock_csum_verify(struct super_block *sb, | ||
2205 | struct ext4_super_block *es); | ||
2206 | extern void ext4_superblock_csum_set(struct super_block *sb); | 2191 | extern void ext4_superblock_csum_set(struct super_block *sb); |
2207 | extern void *ext4_kvmalloc(size_t size, gfp_t flags); | 2192 | extern void *ext4_kvmalloc(size_t size, gfp_t flags); |
2208 | extern void *ext4_kvzalloc(size_t size, gfp_t flags); | 2193 | extern void *ext4_kvzalloc(size_t size, gfp_t flags); |
@@ -2574,19 +2559,11 @@ extern const struct file_operations ext4_dir_operations; | |||
2574 | extern const struct inode_operations ext4_file_inode_operations; | 2559 | extern const struct inode_operations ext4_file_inode_operations; |
2575 | extern const struct file_operations ext4_file_operations; | 2560 | extern const struct file_operations ext4_file_operations; |
2576 | extern loff_t ext4_llseek(struct file *file, loff_t offset, int origin); | 2561 | extern loff_t ext4_llseek(struct file *file, loff_t offset, int origin); |
2577 | extern void ext4_unwritten_wait(struct inode *inode); | ||
2578 | 2562 | ||
2579 | /* inline.c */ | 2563 | /* inline.c */ |
2580 | extern int ext4_has_inline_data(struct inode *inode); | 2564 | extern int ext4_has_inline_data(struct inode *inode); |
2581 | extern int ext4_get_inline_size(struct inode *inode); | ||
2582 | extern int ext4_get_max_inline_size(struct inode *inode); | 2565 | extern int ext4_get_max_inline_size(struct inode *inode); |
2583 | extern int ext4_find_inline_data_nolock(struct inode *inode); | 2566 | extern int ext4_find_inline_data_nolock(struct inode *inode); |
2584 | extern void ext4_write_inline_data(struct inode *inode, | ||
2585 | struct ext4_iloc *iloc, | ||
2586 | void *buffer, loff_t pos, | ||
2587 | unsigned int len); | ||
2588 | extern int ext4_prepare_inline_data(handle_t *handle, struct inode *inode, | ||
2589 | unsigned int len); | ||
2590 | extern int ext4_init_inline_data(handle_t *handle, struct inode *inode, | 2567 | extern int ext4_init_inline_data(handle_t *handle, struct inode *inode, |
2591 | unsigned int len); | 2568 | unsigned int len); |
2592 | extern int ext4_destroy_inline_data(handle_t *handle, struct inode *inode); | 2569 | extern 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 */ |
2781 | extern int ext4_multi_mount_protect(struct super_block *, ext4_fsblk_t); | 2758 | extern int ext4_multi_mount_protect(struct super_block *, ext4_fsblk_t); |
2782 | extern void ext4_mmp_csum_set(struct super_block *sb, struct mmp_struct *mmp); | ||
2783 | extern 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 | ||
125 | void ext4_journal_abort_handle(const char *caller, unsigned int line, | 125 | static 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 | */ |
234 | void 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 | |||
238 | int __ext4_journal_get_write_access(const char *where, unsigned int line, | 234 | int __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 | ||
60 | void ext4_unwritten_wait(struct inode *inode) | 60 | static 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 | ||
25 | int ext4_get_inline_size(struct inode *inode) | 25 | static 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 | */ |
214 | void ext4_write_inline_data(struct inode *inode, struct ext4_iloc *iloc, | 214 | static 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 | ||
376 | int ext4_prepare_inline_data(handle_t *handle, struct inode *inode, | 376 | static 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 | */ |
3446 | int ext4_block_truncate_page(handle_t *handle, | 3446 | static 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 | ||
21 | int ext4_mmp_csum_verify(struct super_block *sb, struct mmp_struct *mmp) | 21 | static 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 | ||
30 | void ext4_mmp_csum_set(struct super_block *sb, struct mmp_struct *mmp) | 30 | static 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 | ||
141 | int ext4_superblock_csum_verify(struct super_block *sb, | 141 | static 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)) |