aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/buffer.c57
-rw-r--r--fs/sync.c1
2 files changed, 28 insertions, 30 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 90a98865b0cc..209f7f15f5f8 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -52,6 +52,7 @@ init_buffer(struct buffer_head *bh, bh_end_io_t *handler, void *private)
52 bh->b_end_io = handler; 52 bh->b_end_io = handler;
53 bh->b_private = private; 53 bh->b_private = private;
54} 54}
55EXPORT_SYMBOL(init_buffer);
55 56
56static int sync_buffer(void *word) 57static int sync_buffer(void *word)
57{ 58{
@@ -80,6 +81,7 @@ void unlock_buffer(struct buffer_head *bh)
80 smp_mb__after_clear_bit(); 81 smp_mb__after_clear_bit();
81 wake_up_bit(&bh->b_state, BH_Lock); 82 wake_up_bit(&bh->b_state, BH_Lock);
82} 83}
84EXPORT_SYMBOL(unlock_buffer);
83 85
84/* 86/*
85 * Block until a buffer comes unlocked. This doesn't stop it 87 * Block until a buffer comes unlocked. This doesn't stop it
@@ -90,6 +92,7 @@ void __wait_on_buffer(struct buffer_head * bh)
90{ 92{
91 wait_on_bit(&bh->b_state, BH_Lock, sync_buffer, TASK_UNINTERRUPTIBLE); 93 wait_on_bit(&bh->b_state, BH_Lock, sync_buffer, TASK_UNINTERRUPTIBLE);
92} 94}
95EXPORT_SYMBOL(__wait_on_buffer);
93 96
94static void 97static void
95__clear_page_buffers(struct page *page) 98__clear_page_buffers(struct page *page)
@@ -144,6 +147,7 @@ void end_buffer_read_sync(struct buffer_head *bh, int uptodate)
144 __end_buffer_read_notouch(bh, uptodate); 147 __end_buffer_read_notouch(bh, uptodate);
145 put_bh(bh); 148 put_bh(bh);
146} 149}
150EXPORT_SYMBOL(end_buffer_read_sync);
147 151
148void end_buffer_write_sync(struct buffer_head *bh, int uptodate) 152void end_buffer_write_sync(struct buffer_head *bh, int uptodate)
149{ 153{
@@ -164,6 +168,7 @@ void end_buffer_write_sync(struct buffer_head *bh, int uptodate)
164 unlock_buffer(bh); 168 unlock_buffer(bh);
165 put_bh(bh); 169 put_bh(bh);
166} 170}
171EXPORT_SYMBOL(end_buffer_write_sync);
167 172
168/* 173/*
169 * Various filesystems appear to want __find_get_block to be non-blocking. 174 * Various filesystems appear to want __find_get_block to be non-blocking.
@@ -272,6 +277,7 @@ void invalidate_bdev(struct block_device *bdev)
272 invalidate_bh_lrus(); 277 invalidate_bh_lrus();
273 invalidate_mapping_pages(mapping, 0, -1); 278 invalidate_mapping_pages(mapping, 0, -1);
274} 279}
280EXPORT_SYMBOL(invalidate_bdev);
275 281
276/* 282/*
277 * Kick pdflush then try to free up some ZONE_NORMAL memory. 283 * Kick pdflush then try to free up some ZONE_NORMAL memory.
@@ -410,6 +416,7 @@ still_busy:
410 local_irq_restore(flags); 416 local_irq_restore(flags);
411 return; 417 return;
412} 418}
419EXPORT_SYMBOL(end_buffer_async_write);
413 420
414/* 421/*
415 * If a page's buffers are under async readin (end_buffer_async_read 422 * If a page's buffers are under async readin (end_buffer_async_read
@@ -438,8 +445,8 @@ static void mark_buffer_async_read(struct buffer_head *bh)
438 set_buffer_async_read(bh); 445 set_buffer_async_read(bh);
439} 446}
440 447
441void mark_buffer_async_write_endio(struct buffer_head *bh, 448static void mark_buffer_async_write_endio(struct buffer_head *bh,
442 bh_end_io_t *handler) 449 bh_end_io_t *handler)
443{ 450{
444 bh->b_end_io = handler; 451 bh->b_end_io = handler;
445 set_buffer_async_write(bh); 452 set_buffer_async_write(bh);
@@ -553,7 +560,7 @@ repeat:
553 return err; 560 return err;
554} 561}
555 562
556void do_thaw_all(struct work_struct *work) 563static void do_thaw_all(struct work_struct *work)
557{ 564{
558 struct super_block *sb; 565 struct super_block *sb;
559 char b[BDEVNAME_SIZE]; 566 char b[BDEVNAME_SIZE];
@@ -1172,6 +1179,7 @@ void mark_buffer_dirty(struct buffer_head *bh)
1172 } 1179 }
1173 } 1180 }
1174} 1181}
1182EXPORT_SYMBOL(mark_buffer_dirty);
1175 1183
1176/* 1184/*
1177 * Decrement a buffer_head's reference count. If all buffers against a page 1185 * Decrement a buffer_head's reference count. If all buffers against a page
@@ -1188,6 +1196,7 @@ void __brelse(struct buffer_head * buf)
1188 } 1196 }
1189 WARN(1, KERN_ERR "VFS: brelse: Trying to free free buffer\n"); 1197 WARN(1, KERN_ERR "VFS: brelse: Trying to free free buffer\n");
1190} 1198}
1199EXPORT_SYMBOL(__brelse);
1191 1200
1192/* 1201/*
1193 * bforget() is like brelse(), except it discards any 1202 * bforget() is like brelse(), except it discards any
@@ -1206,6 +1215,7 @@ void __bforget(struct buffer_head *bh)
1206 } 1215 }
1207 __brelse(bh); 1216 __brelse(bh);
1208} 1217}
1218EXPORT_SYMBOL(__bforget);
1209 1219
1210static struct buffer_head *__bread_slow(struct buffer_head *bh) 1220static struct buffer_head *__bread_slow(struct buffer_head *bh)
1211{ 1221{
@@ -2218,6 +2228,7 @@ int block_read_full_page(struct page *page, get_block_t *get_block)
2218 } 2228 }
2219 return 0; 2229 return 0;
2220} 2230}
2231EXPORT_SYMBOL(block_read_full_page);
2221 2232
2222/* utility function for filesystems that need to do work on expanding 2233/* utility function for filesystems that need to do work on expanding
2223 * truncates. Uses filesystem pagecache writes to allow the filesystem to 2234 * truncates. Uses filesystem pagecache writes to allow the filesystem to
@@ -2252,6 +2263,7 @@ int generic_cont_expand_simple(struct inode *inode, loff_t size)
2252out: 2263out:
2253 return err; 2264 return err;
2254} 2265}
2266EXPORT_SYMBOL(generic_cont_expand_simple);
2255 2267
2256static int cont_expand_zero(struct file *file, struct address_space *mapping, 2268static int cont_expand_zero(struct file *file, struct address_space *mapping,
2257 loff_t pos, loff_t *bytes) 2269 loff_t pos, loff_t *bytes)
@@ -2352,6 +2364,7 @@ int cont_write_begin(struct file *file, struct address_space *mapping,
2352out: 2364out:
2353 return err; 2365 return err;
2354} 2366}
2367EXPORT_SYMBOL(cont_write_begin);
2355 2368
2356int block_prepare_write(struct page *page, unsigned from, unsigned to, 2369int block_prepare_write(struct page *page, unsigned from, unsigned to,
2357 get_block_t *get_block) 2370 get_block_t *get_block)
@@ -2362,6 +2375,7 @@ int block_prepare_write(struct page *page, unsigned from, unsigned to,
2362 ClearPageUptodate(page); 2375 ClearPageUptodate(page);
2363 return err; 2376 return err;
2364} 2377}
2378EXPORT_SYMBOL(block_prepare_write);
2365 2379
2366int block_commit_write(struct page *page, unsigned from, unsigned to) 2380int block_commit_write(struct page *page, unsigned from, unsigned to)
2367{ 2381{
@@ -2369,6 +2383,7 @@ int block_commit_write(struct page *page, unsigned from, unsigned to)
2369 __block_commit_write(inode,page,from,to); 2383 __block_commit_write(inode,page,from,to);
2370 return 0; 2384 return 0;
2371} 2385}
2386EXPORT_SYMBOL(block_commit_write);
2372 2387
2373/* 2388/*
2374 * block_page_mkwrite() is not allowed to change the file size as it gets 2389 * block_page_mkwrite() is not allowed to change the file size as it gets
@@ -2426,6 +2441,7 @@ block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
2426out: 2441out:
2427 return ret; 2442 return ret;
2428} 2443}
2444EXPORT_SYMBOL(block_page_mkwrite);
2429 2445
2430/* 2446/*
2431 * nobh_write_begin()'s prereads are special: the buffer_heads are freed 2447 * nobh_write_begin()'s prereads are special: the buffer_heads are freed
@@ -2849,6 +2865,7 @@ unlock:
2849out: 2865out:
2850 return err; 2866 return err;
2851} 2867}
2868EXPORT_SYMBOL(block_truncate_page);
2852 2869
2853/* 2870/*
2854 * The generic ->writepage function for buffer-backed address_spaces 2871 * The generic ->writepage function for buffer-backed address_spaces
@@ -2890,6 +2907,7 @@ int block_write_full_page_endio(struct page *page, get_block_t *get_block,
2890 zero_user_segment(page, offset, PAGE_CACHE_SIZE); 2907 zero_user_segment(page, offset, PAGE_CACHE_SIZE);
2891 return __block_write_full_page(inode, page, get_block, wbc, handler); 2908 return __block_write_full_page(inode, page, get_block, wbc, handler);
2892} 2909}
2910EXPORT_SYMBOL(block_write_full_page_endio);
2893 2911
2894/* 2912/*
2895 * The generic ->writepage function for buffer-backed address_spaces 2913 * The generic ->writepage function for buffer-backed address_spaces
@@ -2900,7 +2918,7 @@ int block_write_full_page(struct page *page, get_block_t *get_block,
2900 return block_write_full_page_endio(page, get_block, wbc, 2918 return block_write_full_page_endio(page, get_block, wbc,
2901 end_buffer_async_write); 2919 end_buffer_async_write);
2902} 2920}
2903 2921EXPORT_SYMBOL(block_write_full_page);
2904 2922
2905sector_t generic_block_bmap(struct address_space *mapping, sector_t block, 2923sector_t generic_block_bmap(struct address_space *mapping, sector_t block,
2906 get_block_t *get_block) 2924 get_block_t *get_block)
@@ -2913,6 +2931,7 @@ sector_t generic_block_bmap(struct address_space *mapping, sector_t block,
2913 get_block(inode, block, &tmp, 0); 2931 get_block(inode, block, &tmp, 0);
2914 return tmp.b_blocknr; 2932 return tmp.b_blocknr;
2915} 2933}
2934EXPORT_SYMBOL(generic_block_bmap);
2916 2935
2917static void end_bio_bh_io_sync(struct bio *bio, int err) 2936static void end_bio_bh_io_sync(struct bio *bio, int err)
2918{ 2937{
@@ -2982,6 +3001,7 @@ int submit_bh(int rw, struct buffer_head * bh)
2982 bio_put(bio); 3001 bio_put(bio);
2983 return ret; 3002 return ret;
2984} 3003}
3004EXPORT_SYMBOL(submit_bh);
2985 3005
2986/** 3006/**
2987 * ll_rw_block: low-level access to block devices (DEPRECATED) 3007 * ll_rw_block: low-level access to block devices (DEPRECATED)
@@ -3043,6 +3063,7 @@ void ll_rw_block(int rw, int nr, struct buffer_head *bhs[])
3043 unlock_buffer(bh); 3063 unlock_buffer(bh);
3044 } 3064 }
3045} 3065}
3066EXPORT_SYMBOL(ll_rw_block);
3046 3067
3047/* 3068/*
3048 * For a data-integrity writeout, we need to wait upon any in-progress I/O 3069 * For a data-integrity writeout, we need to wait upon any in-progress I/O
@@ -3071,6 +3092,7 @@ int sync_dirty_buffer(struct buffer_head *bh)
3071 } 3092 }
3072 return ret; 3093 return ret;
3073} 3094}
3095EXPORT_SYMBOL(sync_dirty_buffer);
3074 3096
3075/* 3097/*
3076 * try_to_free_buffers() checks if all the buffers on this particular page 3098 * try_to_free_buffers() checks if all the buffers on this particular page
@@ -3185,6 +3207,7 @@ void block_sync_page(struct page *page)
3185 if (mapping) 3207 if (mapping)
3186 blk_run_backing_dev(mapping->backing_dev_info, page); 3208 blk_run_backing_dev(mapping->backing_dev_info, page);
3187} 3209}
3210EXPORT_SYMBOL(block_sync_page);
3188 3211
3189/* 3212/*
3190 * There are no bdflush tunables left. But distributions are 3213 * There are no bdflush tunables left. But distributions are
@@ -3361,29 +3384,3 @@ void __init buffer_init(void)
3361 max_buffer_heads = nrpages * (PAGE_SIZE / sizeof(struct buffer_head)); 3384 max_buffer_heads = nrpages * (PAGE_SIZE / sizeof(struct buffer_head));
3362 hotcpu_notifier(buffer_cpu_notify, 0); 3385 hotcpu_notifier(buffer_cpu_notify, 0);
3363} 3386}
3364
3365EXPORT_SYMBOL(__bforget);
3366EXPORT_SYMBOL(__brelse);
3367EXPORT_SYMBOL(__wait_on_buffer);
3368EXPORT_SYMBOL(block_commit_write);
3369EXPORT_SYMBOL(block_prepare_write);
3370EXPORT_SYMBOL(block_page_mkwrite);
3371EXPORT_SYMBOL(block_read_full_page);
3372EXPORT_SYMBOL(block_sync_page);
3373EXPORT_SYMBOL(block_truncate_page);
3374EXPORT_SYMBOL(block_write_full_page);
3375EXPORT_SYMBOL(block_write_full_page_endio);
3376EXPORT_SYMBOL(cont_write_begin);
3377EXPORT_SYMBOL(end_buffer_read_sync);
3378EXPORT_SYMBOL(end_buffer_write_sync);
3379EXPORT_SYMBOL(end_buffer_async_write);
3380EXPORT_SYMBOL(file_fsync);
3381EXPORT_SYMBOL(generic_block_bmap);
3382EXPORT_SYMBOL(generic_cont_expand_simple);
3383EXPORT_SYMBOL(init_buffer);
3384EXPORT_SYMBOL(invalidate_bdev);
3385EXPORT_SYMBOL(ll_rw_block);
3386EXPORT_SYMBOL(mark_buffer_dirty);
3387EXPORT_SYMBOL(submit_bh);
3388EXPORT_SYMBOL(sync_dirty_buffer);
3389EXPORT_SYMBOL(unlock_buffer);
diff --git a/fs/sync.c b/fs/sync.c
index c08467a5d7cb..d104591b066b 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -183,6 +183,7 @@ int file_fsync(struct file *filp, struct dentry *dentry, int datasync)
183 ret = err; 183 ret = err;
184 return ret; 184 return ret;
185} 185}
186EXPORT_SYMBOL(file_fsync);
186 187
187/** 188/**
188 * vfs_fsync_range - helper to sync a range of data & metadata to disk 189 * vfs_fsync_range - helper to sync a range of data & metadata to disk