From: Rakesh Pandit <rakesh@tuxera.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Jan Kara <jack@suse.cz>
Subject: [PATCH V2] vfs: remove unused argument in iterate_bdevs
Date: Thu, 11 Jan 2018 17:31:44 +0200 [thread overview]
Message-ID: <20180111153143.GA11619@dhcp-108-107.ws.tuxera.com> (raw)
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Reviewed-by: Jan Kara <jack@suse.cz>
---
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
reply other threads:[~2018-01-11 15:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180111153143.GA11619@dhcp-108-107.ws.tuxera.com \
--to=rakesh@tuxera.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).