Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110518
b: refs/heads/master
c: 0c002c2
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Patterson authored and Jens Axboe committed Oct 9, 2008
1 parent 5f86525 commit 2888cd4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 243294dae09c909c0442c8f04d470b69c3c19d6e
refs/heads/master: 0c002c2f74e10baa9021d3ecc50585c6eafea568
21 changes: 21 additions & 0 deletions trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,27 @@ struct block_device *open_by_devnum(dev_t dev, unsigned mode)

EXPORT_SYMBOL(open_by_devnum);

/**
* revalidate_disk - wrapper for lower-level driver's revalidate_disk
* call-back
*
* @disk: struct gendisk to be revalidated
*
* This routine is a wrapper for lower-level driver's revalidate_disk
* call-backs. It is used to do common pre and post operations needed
* for all revalidate_disk operations.
*/
int revalidate_disk(struct gendisk *disk)
{
int ret = 0;

if (disk->fops->revalidate_disk)
ret = disk->fops->revalidate_disk(disk);

return ret;
}
EXPORT_SYMBOL(revalidate_disk);

/*
* This routine checks whether a removable media has been changed,
* and invalidates all buffer-cache-entries in that case. This
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,7 @@ extern int fs_may_remount_ro(struct super_block *);
*/
#define bio_data_dir(bio) ((bio)->bi_rw & 1)

extern int revalidate_disk(struct gendisk *);
extern int check_disk_change(struct block_device *);
extern int __invalidate_device(struct block_device *);
extern int invalidate_partition(struct gendisk *, int);
Expand Down

0 comments on commit 2888cd4

Please sign in to comment.