Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54220
b: refs/heads/master
c: f9a1439
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed May 7, 2007
1 parent caff6eb commit 0d46b25
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f98393a64ca1392130724c3acb4e3f325801d2b6
refs/heads/master: f9a14399aea13830d8af6798a53207bb0a900945
6 changes: 4 additions & 2 deletions trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ static sector_t max_block(struct block_device *bdev)
return retval;
}

/* Kill _all_ buffers, dirty or not.. */
/* Kill _all_ buffers and pagecache , dirty or not.. */
static void kill_bdev(struct block_device *bdev)
{
invalidate_bdev(bdev);
if (bdev->bd_inode->i_mapping->nrpages == 0)
return;
invalidate_bh_lrus();
truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <linux/bit_spinlock.h>

static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);
static void invalidate_bh_lrus(void);

#define BH_ENTRY(list) list_entry((list), struct buffer_head, b_assoc_buffers)

Expand Down Expand Up @@ -1403,7 +1402,7 @@ static void invalidate_bh_lru(void *arg)
put_cpu_var(bh_lrus);
}

static void invalidate_bh_lrus(void)
void invalidate_bh_lrus(void)
{
on_each_cpu(invalidate_bh_lru, NULL, 1, 1);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/buffer_head.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ void __brelse(struct buffer_head *);
void __bforget(struct buffer_head *);
void __breadahead(struct block_device *, sector_t block, unsigned int size);
struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size);
void invalidate_bh_lrus(void);
struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
void free_buffer_head(struct buffer_head * bh);
void FASTCALL(unlock_buffer(struct buffer_head *bh));
Expand Down

0 comments on commit 0d46b25

Please sign in to comment.