linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Bin <zhengbin13@huawei.com>
To: <hch@infradead.org>, <axboe@kernel.dk>, <bvanassche@acm.org>,
	<jaegeuk@kernel.org>, <viro@zeniv.linux.org.uk>,
	<linux-fsdevel@vger.kernel.org>, <linux-block@vger.kernel.org>
Cc: <houtao1@huawei.com>, <yi.zhang@huawei.com>, <zhengbin13@huawei.com>
Subject: [PATCH v2 2/2] block: make function 'kill_bdev' static
Date: Sat, 30 May 2020 19:40:32 +0800	[thread overview]
Message-ID: <20200530114032.125678-3-zhengbin13@huawei.com> (raw)
In-Reply-To: <20200530114032.125678-1-zhengbin13@huawei.com>

kill_bdev does not have any external user, so make it static.

Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 fs/block_dev.c     | 5 ++---
 include/linux/fs.h | 2 --
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 93672c3f1c78..2396ebd014ba 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -75,7 +75,7 @@ static void bdev_write_inode(struct block_device *bdev)
 }

 /* Kill _all_ buffers and pagecache , dirty or not.. */
-void kill_bdev(struct block_device *bdev)
+static void kill_bdev(struct block_device *bdev)
 {
 	struct address_space *mapping = bdev->bd_inode->i_mapping;

@@ -84,8 +84,7 @@ void kill_bdev(struct block_device *bdev)

 	invalidate_bh_lrus();
 	truncate_inode_pages(mapping, 0);
-}	
-EXPORT_SYMBOL(kill_bdev);
+}

 /* Invalidate clean unused buffers and pagecache. */
 void invalidate_bdev(struct block_device *bdev)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 45cc10cdf6dd..d0ad120298be 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2590,7 +2590,6 @@ extern void bdput(struct block_device *);
 extern void invalidate_bdev(struct block_device *);
 extern void iterate_bdevs(void (*)(struct block_device *, void *), void *);
 extern int sync_blockdev(struct block_device *bdev);
-extern void kill_bdev(struct block_device *);
 extern struct super_block *freeze_bdev(struct block_device *);
 extern void emergency_thaw_all(void);
 extern void emergency_thaw_bdev(struct super_block *sb);
@@ -2606,7 +2605,6 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
 #else
 static inline void bd_forget(struct inode *inode) {}
 static inline int sync_blockdev(struct block_device *bdev) { return 0; }
-static inline void kill_bdev(struct block_device *bdev) {}
 static inline void invalidate_bdev(struct block_device *bdev) {}

 static inline struct super_block *freeze_bdev(struct block_device *sb)
--
2.21.3


  parent reply	other threads:[~2020-05-30 11:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-30 11:40 [PATCH v2 0/2] loop: replace kill_bdev with invalidate_bdev Zheng Bin
2020-05-30 11:40 ` [PATCH v2 1/2] " Zheng Bin
2020-06-18  2:14   ` Bart Van Assche
2020-05-30 11:40 ` Zheng Bin [this message]
2020-05-30 11:36   ` [PATCH v2 2/2] block: make function 'kill_bdev' static Christoph Hellwig
2020-06-18  2:13   ` Bart Van Assche
2020-06-08  2:39 ` [PATCH v2 0/2] loop: replace kill_bdev with invalidate_bdev Zhengbin (OSKernel)
2020-06-18  1:11   ` Zhengbin (OSKernel)
2020-06-18  3:46 ` Jens Axboe

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=20200530114032.125678-3-zhengbin13@huawei.com \
    --to=zhengbin13@huawei.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hch@infradead.org \
    --cc=houtao1@huawei.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yi.zhang@huawei.com \
    /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).