Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934713AbeAKPbs (ORCPT + 1 other); Thu, 11 Jan 2018 10:31:48 -0500 Received: from mx2.mpynet.fi ([82.197.21.85]:53902 "EHLO mx2.mpynet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934694AbeAKPbr (ORCPT ); Thu, 11 Jan 2018 10:31:47 -0500 Date: Thu, 11 Jan 2018 17:31:44 +0200 From: Rakesh Pandit To: Alexander Viro CC: , , Jan Kara Subject: [PATCH V2] vfs: remove unused argument in iterate_bdevs Message-ID: <20180111153143.GA11619@dhcp-108-107.ws.tuxera.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-ClientProxiedBy: tuxera-exch.ad.tuxera.com (10.20.48.11) To tuxera-exch.ad.tuxera.com (10.20.48.11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Signed-off-by: Rakesh Pandit Reviewed-by: Jan Kara --- V2: fixed missing removal of 'void *' argument (Jan) 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..3469078 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 *)) { } -- 2.5.5