Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933113AbeAKOEL (ORCPT + 1 other); Thu, 11 Jan 2018 09:04:11 -0500 Received: from mx1.mpynet.fi ([82.197.21.84]:60640 "EHLO mx1.mpynet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754170AbeAKOEK (ORCPT ); Thu, 11 Jan 2018 09:04:10 -0500 Date: Thu, 11 Jan 2018 16:04:07 +0200 From: Rakesh Pandit To: , CC: Alexander Viro , Jan Kara Subject: [PATCH] vfs: remove unused argument in iterate_bdevs Message-ID: <20180111140406.GA10714@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 --- 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