[PATCH] vfs: remove unused argument in iterate_bdevs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Rakesh Pandit <rakesh@xxxxxxxxxx>
---
 fs/block_dev.c     |  4 ++--
 fs/sync.c          | 12 ++++++------
 include/linux/fs.h |  4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 4a181fc..95eba30 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -2112,7 +2112,7 @@ int __invalidate_device(struct block_device *bdev, bool kill_dirty)
 }
 EXPORT_SYMBOL(__invalidate_device);
 
-void iterate_bdevs(void (*func)(struct block_device *, void *), void *arg)
+void iterate_bdevs(void (*func)(struct block_device *))
 {
 	struct inode *inode, *old_inode = NULL;
 
@@ -2144,7 +2144,7 @@ void iterate_bdevs(void (*func)(struct block_device *, void *), void *arg)
 
 		mutex_lock(&bdev->bd_mutex);
 		if (bdev->bd_openers)
-			func(bdev, arg);
+			func(bdev);
 		mutex_unlock(&bdev->bd_mutex);
 
 		spin_lock(&blockdev_superblock->s_inode_list_lock);
diff --git a/fs/sync.c b/fs/sync.c
index 6e0a2cb..47bfff8 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -80,12 +80,12 @@ static void sync_fs_one_sb(struct super_block *sb, void *arg)
 		sb->s_op->sync_fs(sb, *(int *)arg);
 }
 
-static void fdatawrite_one_bdev(struct block_device *bdev, void *arg)
+static void fdatawrite_one_bdev(struct block_device *bdev)
 {
 	filemap_fdatawrite(bdev->bd_inode->i_mapping);
 }
 
-static void fdatawait_one_bdev(struct block_device *bdev, void *arg)
+static void fdatawait_one_bdev(struct block_device *bdev)
 {
 	/*
 	 * We keep the error status of individual mapping so that
@@ -113,8 +113,8 @@ SYSCALL_DEFINE0(sync)
 	iterate_supers(sync_inodes_one_sb, NULL);
 	iterate_supers(sync_fs_one_sb, &nowait);
 	iterate_supers(sync_fs_one_sb, &wait);
-	iterate_bdevs(fdatawrite_one_bdev, NULL);
-	iterate_bdevs(fdatawait_one_bdev, NULL);
+	iterate_bdevs(fdatawrite_one_bdev);
+	iterate_bdevs(fdatawait_one_bdev);
 	if (unlikely(laptop_mode))
 		laptop_sync_completion();
 	return 0;
@@ -130,10 +130,10 @@ static void do_sync_work(struct work_struct *work)
 	 */
 	iterate_supers(sync_inodes_one_sb, &nowait);
 	iterate_supers(sync_fs_one_sb, &nowait);
-	iterate_bdevs(fdatawrite_one_bdev, NULL);
+	iterate_bdevs(fdatawrite_one_bdev);
 	iterate_supers(sync_inodes_one_sb, &nowait);
 	iterate_supers(sync_fs_one_sb, &nowait);
-	iterate_bdevs(fdatawrite_one_bdev, NULL);
+	iterate_bdevs(fdatawrite_one_bdev);
 	printk("Emergency Sync complete\n");
 	kfree(work);
 }
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 511fbaa..6a2d7b9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2442,7 +2442,7 @@ extern void bd_set_size(struct block_device *, loff_t size);
 extern void bd_forget(struct inode *inode);
 extern void bdput(struct block_device *);
 extern void invalidate_bdev(struct block_device *);
-extern void iterate_bdevs(void (*)(struct block_device *, void *), void *);
+extern void iterate_bdevs(void (*)(struct block_device *));
 extern int sync_blockdev(struct block_device *bdev);
 extern void kill_bdev(struct block_device *);
 extern struct super_block *freeze_bdev(struct block_device *);
@@ -2472,7 +2472,7 @@ static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb)
 	return 0;
 }
 
-static inline void iterate_bdevs(void (*f)(struct block_device *, void *), void *arg)
+static inline void iterate_bdevs(void (*f)(struct block_device *, void *))
 {
 }
 
-- 
2.5.5




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux