aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndrew Patterson <andrew.patterson@hp.com>2008-09-04 16:27:20 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:12 -0400
commit0c002c2f74e10baa9021d3ecc50585c6eafea568 (patch)
treec7d29fe0968b852f798f78bbd9231df155c56180 /fs
parent243294dae09c909c0442c8f04d470b69c3c19d6e (diff)
Wrapper for lower-level revalidate_disk routines.
This is a wrapper for the lower-level revalidate_disk call-backs such as sd_revalidate_disk(). It allows us to perform pre and post operations when calling them. We will use this wrapper in a later patch to adjust block device sizes after an online resize (a _post_ operation). Signed-off-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/block_dev.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index c3fa19bd64df..4eeb69a88734 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -852,6 +852,27 @@ struct block_device *open_by_devnum(dev_t dev, unsigned mode)
852 852
853EXPORT_SYMBOL(open_by_devnum); 853EXPORT_SYMBOL(open_by_devnum);
854 854
855/**
856 * revalidate_disk - wrapper for lower-level driver's revalidate_disk
857 * call-back
858 *
859 * @disk: struct gendisk to be revalidated
860 *
861 * This routine is a wrapper for lower-level driver's revalidate_disk
862 * call-backs. It is used to do common pre and post operations needed
863 * for all revalidate_disk operations.
864 */
865int revalidate_disk(struct gendisk *disk)
866{
867 int ret = 0;
868
869 if (disk->fops->revalidate_disk)
870 ret = disk->fops->revalidate_disk(disk);
871
872 return ret;
873}
874EXPORT_SYMBOL(revalidate_disk);
875
855/* 876/*
856 * This routine checks whether a removable media has been changed, 877 * This routine checks whether a removable media has been changed,
857 * and invalidates all buffer-cache-entries in that case. This 878 * and invalidates all buffer-cache-entries in that case. This