From 816ab591e901697ebf566a4bc29e5c1605767f8e Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Sat, 10 Aug 2002 02:21:49 -0700 Subject: [PATCH] partition table flush/read cleanup Big One. Flushing/rereading partition tables is taken from ->revalidate() for partitioned devices; now it's done in the caller (check_disk_change()). BLKRRPART handling also moved out of drivers - they are still allowed to override it (DAC960 and i2o are the only remaining ones), but common case is handled in fs/block_dev.c. Note: we are still only shifting stuff - bd_sem deadlocks in check_disk_change() are still there. However, now we have all relevant code outside of drivers and that will allow to fix the thing (see next patches). --- include/linux/fs.h | 26 -------------------------- include/linux/ide.h | 2 +- 2 files changed, 1 insertion(+), 27 deletions(-) (limited to 'include') diff --git a/include/linux/fs.h b/include/linux/fs.h index b0d9ffe25088..9ad9cdf3e668 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1307,31 +1307,5 @@ static inline ino_t parent_ino(struct dentry *dentry) return res; } -/* NOTE NOTE NOTE: this interface _will_ change in a couple of patches */ - -static inline int dev_lock_part(kdev_t dev) -{ - struct block_device *bdev = bdget(kdev_t_to_nr(dev)); - if (!bdev) - return -ENOMEM; - if (!down_trylock(&bdev->bd_part_sem)) { - if (!bdev->bd_part_count) - return 0; - up(&bdev->bd_part_sem); - } - bdput(bdev); - return -EBUSY; -} - -static inline void dev_unlock_part(kdev_t dev) -{ - struct block_device *bdev = bdget(kdev_t_to_nr(dev)); - if (!bdev) - BUG(); - up(&bdev->bd_part_sem); - bdput(bdev); - bdput(bdev); -} - #endif /* __KERNEL__ */ #endif /* _LINUX_FS_H */ diff --git a/include/linux/ide.h b/include/linux/ide.h index 6de4ad25531c..8b6a08364aaa 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1161,7 +1161,7 @@ extern int idescsi_init(void); extern int ata_register_device(struct ata_device *, struct ata_operations *); extern int ata_unregister_device(struct ata_device *drive); -extern int ata_revalidate(kdev_t i_rdev); +extern int ide_revalidate(kdev_t i_rdev); extern void ide_driver_module(void); #ifdef CONFIG_PCI -- cgit v1.2.3