diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 1d0852fa728b..7db24b9e5449 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <linux/bit_spinlock.h> | 44 | #include <linux/bit_spinlock.h> |
45 | 45 | ||
46 | static int fsync_buffers_list(spinlock_t *lock, struct list_head *list); | 46 | static int fsync_buffers_list(spinlock_t *lock, struct list_head *list); |
47 | static void invalidate_bh_lrus(void); | ||
48 | 47 | ||
49 | #define BH_ENTRY(list) list_entry((list), struct buffer_head, b_assoc_buffers) | 48 | #define BH_ENTRY(list) list_entry((list), struct buffer_head, b_assoc_buffers) |
50 | 49 | ||
@@ -333,7 +332,7 @@ out: | |||
333 | we think the disk contains more recent information than the buffercache. | 332 | we think the disk contains more recent information than the buffercache. |
334 | The update == 1 pass marks the buffers we need to update, the update == 2 | 333 | The update == 1 pass marks the buffers we need to update, the update == 2 |
335 | pass does the actual I/O. */ | 334 | pass does the actual I/O. */ |
336 | void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers) | 335 | void invalidate_bdev(struct block_device *bdev) |
337 | { | 336 | { |
338 | struct address_space *mapping = bdev->bd_inode->i_mapping; | 337 | struct address_space *mapping = bdev->bd_inode->i_mapping; |
339 | 338 | ||
@@ -341,11 +340,6 @@ void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers) | |||
341 | return; | 340 | return; |
342 | 341 | ||
343 | invalidate_bh_lrus(); | 342 | invalidate_bh_lrus(); |
344 | /* | ||
345 | * FIXME: what about destroy_dirty_buffers? | ||
346 | * We really want to use invalidate_inode_pages2() for | ||
347 | * that, but not until that's cleaned up. | ||
348 | */ | ||
349 | invalidate_mapping_pages(mapping, 0, -1); | 343 | invalidate_mapping_pages(mapping, 0, -1); |
350 | } | 344 | } |
351 | 345 | ||
@@ -1408,7 +1402,7 @@ static void invalidate_bh_lru(void *arg) | |||
1408 | put_cpu_var(bh_lrus); | 1402 | put_cpu_var(bh_lrus); |
1409 | } | 1403 | } |
1410 | 1404 | ||
1411 | static void invalidate_bh_lrus(void) | 1405 | void invalidate_bh_lrus(void) |
1412 | { | 1406 | { |
1413 | on_each_cpu(invalidate_bh_lru, NULL, 1, 1); | 1407 | on_each_cpu(invalidate_bh_lru, NULL, 1, 1); |
1414 | } | 1408 | } |
@@ -1700,17 +1694,8 @@ done: | |||
1700 | * clean. Someone wrote them back by hand with | 1694 | * clean. Someone wrote them back by hand with |
1701 | * ll_rw_block/submit_bh. A rare case. | 1695 | * ll_rw_block/submit_bh. A rare case. |
1702 | */ | 1696 | */ |
1703 | int uptodate = 1; | ||
1704 | do { | ||
1705 | if (!buffer_uptodate(bh)) { | ||
1706 | uptodate = 0; | ||
1707 | break; | ||
1708 | } | ||
1709 | bh = bh->b_this_page; | ||
1710 | } while (bh != head); | ||
1711 | if (uptodate) | ||
1712 | SetPageUptodate(page); | ||
1713 | end_page_writeback(page); | 1697 | end_page_writeback(page); |
1698 | |||
1714 | /* | 1699 | /* |
1715 | * The page and buffer_heads can be released at any time from | 1700 | * The page and buffer_heads can be released at any time from |
1716 | * here on. | 1701 | * here on. |
@@ -2968,8 +2953,7 @@ EXPORT_SYMBOL(free_buffer_head); | |||
2968 | static void | 2953 | static void |
2969 | init_buffer_head(void *data, struct kmem_cache *cachep, unsigned long flags) | 2954 | init_buffer_head(void *data, struct kmem_cache *cachep, unsigned long flags) |
2970 | { | 2955 | { |
2971 | if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == | 2956 | if (flags & SLAB_CTOR_CONSTRUCTOR) { |
2972 | SLAB_CTOR_CONSTRUCTOR) { | ||
2973 | struct buffer_head * bh = (struct buffer_head *)data; | 2957 | struct buffer_head * bh = (struct buffer_head *)data; |
2974 | 2958 | ||
2975 | memset(bh, 0, sizeof(*bh)); | 2959 | memset(bh, 0, sizeof(*bh)); |