]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mm: remove destroy_dirty_buffers from invalidate_bdev()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Sun, 6 May 2007 21:49:54 +0000 (14:49 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:12:55 +0000 (12:12 -0700)
Remove the destroy_dirty_buffers argument from invalidate_bdev(), it hasn't
been used in 6 years (so akpm says).

find * -name \*.[ch] | xargs grep -l invalidate_bdev |
while read file; do
quilt add $file;
sed -ie 's/invalidate_bdev(\([^,]*\),[^)]*)/invalidate_bdev(\1)/g' $file;
done

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 files changed:
block/ioctl.c
drivers/block/amiflop.c
drivers/block/loop.c
drivers/block/rd.c
drivers/cdrom/cdrom.c
drivers/md/md.c
fs/block_dev.c
fs/buffer.c
fs/dquot.c
fs/ext3/super.c
fs/ext4/super.c
fs/partitions/acorn.c
include/linux/buffer_head.h

index e06dbe9bc8588ac7aa6eb96b3378d16bdbaa9816..f7e3e8abf8874bc849b87922df82d7b3fd34ad1b 100644 (file)
@@ -80,7 +80,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
                        }
                        /* all seems OK */
                        fsync_bdev(bdevp);
-                       invalidate_bdev(bdevp, 0);
+                       invalidate_bdev(bdevp);
 
                        mutex_lock_nested(&bdev->bd_mutex, 1);
                        delete_partition(disk, part);
@@ -236,7 +236,7 @@ int blkdev_ioctl(struct inode *inode, struct file *file, unsigned cmd,
 
                lock_kernel();
                fsync_bdev(bdev);
-               invalidate_bdev(bdev, 0);
+               invalidate_bdev(bdev);
                unlock_kernel();
                return 0;
 
index 5d6562171533ff31f226756ae025f4fe7a678be7..27a139025cedaf677124a67d21a54447b621f500 100644 (file)
@@ -1480,7 +1480,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
                break;
        case FDFMTEND:
                floppy_off(drive);
-               invalidate_bdev(inode->i_bdev, 0);
+               invalidate_bdev(inode->i_bdev);
                break;
        case FDGETPRM:
                memset((void *)&getprm, 0, sizeof (getprm));
index 6b5b642074079d544614af1e83485ad1f91398fc..0d4ccd4a09574fdfa3b72533b2fc333bfb191462 100644 (file)
@@ -833,7 +833,7 @@ out_clr:
        lo->lo_backing_file = NULL;
        lo->lo_flags = 0;
        set_capacity(disks[lo->lo_number], 0);
-       invalidate_bdev(bdev, 0);
+       invalidate_bdev(bdev);
        bd_set_size(bdev, 0);
        mapping_set_gfp_mask(mapping, lo->old_gfp_mask);
        lo->lo_state = Lo_unbound;
@@ -917,7 +917,7 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev)
        memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE);
        memset(lo->lo_crypt_name, 0, LO_NAME_SIZE);
        memset(lo->lo_file_name, 0, LO_NAME_SIZE);
-       invalidate_bdev(bdev, 0);
+       invalidate_bdev(bdev);
        set_capacity(disks[lo->lo_number], 0);
        bd_set_size(bdev, 0);
        mapping_set_gfp_mask(filp->f_mapping, gfp);
index 485aa87e9bcd6069b7c17a72d2fe946a95100db5..43d4ebcb3b4410b6f1218e22df8cbee482744a39 100644 (file)
@@ -403,7 +403,7 @@ static void __exit rd_cleanup(void)
                struct block_device *bdev = rd_bdev[i];
                rd_bdev[i] = NULL;
                if (bdev) {
-                       invalidate_bdev(bdev, 1);
+                       invalidate_bdev(bdev);
                        blkdev_put(bdev);
                }
                del_gendisk(rd_disks[i]);
index b36f44d4d1bf6c3d97e1682ff7611fb87e0044f1..3625a05bc3d33fbd78c97d1a6a04ac03b596822d 100644 (file)
@@ -2384,7 +2384,7 @@ static int cdrom_ioctl_reset(struct cdrom_device_info *cdi,
                return -EACCES;
        if (!CDROM_CAN(CDC_RESET))
                return -ENOSYS;
-       invalidate_bdev(bdev, 0);
+       invalidate_bdev(bdev);
        return cdi->ops->reset(cdi);
 }
 
index 509171ca7fa8b78f6dfe10179b9f7d2a8f2e13b3..2b4315d7e5d6531573e7ecfedd425df19178a3f3 100644 (file)
@@ -3080,7 +3080,7 @@ static int do_md_run(mddev_t * mddev)
                if (test_bit(Faulty, &rdev->flags))
                        continue;
                sync_blockdev(rdev->bdev);
-               invalidate_bdev(rdev->bdev, 0);
+               invalidate_bdev(rdev->bdev);
        }
 
        md_probe(mddev->unit, NULL, NULL);
index 575076c018f4789c3c5f313f56b7b09674604baf..21e59acbcfdf29acbad970d622cb9621efc125c0 100644 (file)
@@ -58,7 +58,7 @@ static sector_t max_block(struct block_device *bdev)
 /* Kill _all_ buffers, dirty or not.. */
 static void kill_bdev(struct block_device *bdev)
 {
-       invalidate_bdev(bdev, 1);
+       invalidate_bdev(bdev);
        truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
 }      
 
@@ -1478,7 +1478,7 @@ int __invalidate_device(struct block_device *bdev)
                res = invalidate_inodes(sb);
                drop_super(sb);
        }
-       invalidate_bdev(bdev, 0);
+       invalidate_bdev(bdev);
        return res;
 }
 EXPORT_SYMBOL(__invalidate_device);
index dcc5faa573bae6677964453cf5a2392310c73c32..630df3e6fe0c77a07b9d0caaf9edf54a29435dff 100644 (file)
@@ -333,7 +333,7 @@ out:
    we think the disk contains more recent information than the buffercache.
    The update == 1 pass marks the buffers we need to update, the update == 2
    pass does the actual I/O. */
-void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers)
+void invalidate_bdev(struct block_device *bdev)
 {
        struct address_space *mapping = bdev->bd_inode->i_mapping;
 
@@ -341,11 +341,6 @@ void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers)
                return;
 
        invalidate_bh_lrus();
-       /*
-        * FIXME: what about destroy_dirty_buffers?
-        * We really want to use invalidate_inode_pages2() for
-        * that, but not until that's cleaned up.
-        */
        invalidate_mapping_pages(mapping, 0, -1);
 }
 
index b16f991662c1b5d58db4dde3fc982125a015472f..0a5febc159f25b03ecc70f2a22090f3c3fa4fe33 100644 (file)
@@ -1432,7 +1432,7 @@ int vfs_quota_off(struct super_block *sb, int type)
                        mutex_unlock(&dqopt->dqonoff_mutex);
                }
        if (sb->s_bdev)
-               invalidate_bdev(sb->s_bdev, 0);
+               invalidate_bdev(sb->s_bdev);
        return 0;
 }
 
@@ -1468,7 +1468,7 @@ static int vfs_quota_on_inode(struct inode *inode, int type, int format_id)
         * we see all the changes from userspace... */
        write_inode_now(inode, 1);
        /* And now flush the block cache so that kernel sees the changes */
-       invalidate_bdev(sb->s_bdev, 0);
+       invalidate_bdev(sb->s_bdev);
        mutex_lock(&inode->i_mutex);
        mutex_lock(&dqopt->dqonoff_mutex);
        if (sb_has_quota_enabled(sb, type)) {
index 4a4fcd6868c7c483ae99be2ac947d7416150bfe6..4266b708ca015868c52229abce13a2fb8cc73467 100644 (file)
@@ -420,7 +420,7 @@ static void ext3_put_super (struct super_block * sb)
                dump_orphan_list(sb, sbi);
        J_ASSERT(list_empty(&sbi->s_orphan));
 
-       invalidate_bdev(sb->s_bdev, 0);
+       invalidate_bdev(sb->s_bdev);
        if (sbi->journal_bdev && sbi->journal_bdev != sb->s_bdev) {
                /*
                 * Invalidate the journal device's buffers.  We don't want them
@@ -428,7 +428,7 @@ static void ext3_put_super (struct super_block * sb)
                 * hotswapped, and it breaks the `ro-after' testing code.
                 */
                sync_blockdev(sbi->journal_bdev);
-               invalidate_bdev(sbi->journal_bdev, 0);
+               invalidate_bdev(sbi->journal_bdev);
                ext3_blkdev_remove(sbi);
        }
        sb->s_fs_info = NULL;
index 61c4718e4a5391239191e2043c3a6a3e56e0f0c9..25e8d009617678fe5c7d12b8f2ab5a0306fee506 100644 (file)
@@ -470,7 +470,7 @@ static void ext4_put_super (struct super_block * sb)
                dump_orphan_list(sb, sbi);
        J_ASSERT(list_empty(&sbi->s_orphan));
 
-       invalidate_bdev(sb->s_bdev, 0);
+       invalidate_bdev(sb->s_bdev);
        if (sbi->journal_bdev && sbi->journal_bdev != sb->s_bdev) {
                /*
                 * Invalidate the journal device's buffers.  We don't want them
@@ -478,7 +478,7 @@ static void ext4_put_super (struct super_block * sb)
                 * hotswapped, and it breaks the `ro-after' testing code.
                 */
                sync_blockdev(sbi->journal_bdev);
-               invalidate_bdev(sbi->journal_bdev, 0);
+               invalidate_bdev(sbi->journal_bdev);
                ext4_blkdev_remove(sbi);
        }
        sb->s_fs_info = NULL;
index 1bc9f372c7d4cbf94c676f128ef66db757afb386..9a6826c63818a2d6b32f150e7c4f6bb669e66e7d 100644 (file)
@@ -271,7 +271,7 @@ adfspart_check_ADFS(struct parsed_partitions *state, struct block_device *bdev)
                extern void xd_set_geometry(struct block_device *,
                        unsigned char, unsigned char, unsigned int);
                xd_set_geometry(bdev, dr->secspertrack, heads, 1);
-               invalidate_bdev(bdev, 1);
+               invalidate_bdev(bdev);
                truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
        }
 #endif
index dd27b1c7227f19bcdf177632816b22256538284b..632c50b21386d618146ad75995c99566c7175ec3 100644 (file)
@@ -165,7 +165,7 @@ int sync_mapping_buffers(struct address_space *mapping);
 void unmap_underlying_metadata(struct block_device *bdev, sector_t block);
 
 void mark_buffer_async_write(struct buffer_head *bh);
-void invalidate_bdev(struct block_device *, int);
+void invalidate_bdev(struct block_device *);
 int sync_blockdev(struct block_device *bdev);
 void __wait_on_buffer(struct buffer_head *);
 wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
@@ -319,7 +319,7 @@ static inline int inode_has_buffers(struct inode *inode) { return 0; }
 static inline void invalidate_inode_buffers(struct inode *inode) {}
 static inline int remove_inode_buffers(struct inode *inode) { return 1; }
 static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; }
-static inline void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers) {}
+static inline void invalidate_bdev(struct block_device *bdev) {}
 
 
 #endif /* CONFIG_BLOCK */