public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miao Xie <miaox@cn.fujitsu.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	viro <viro@zeniv.linux.org.uk>,
	Chris Mason <chris.mason@oracle.com>, Ito <t-itoh@jp.fujitsu.com>,
	Linux Btrfs <linux-btrfs@vger.kernel.org>,
	Linux Fsdevel <linux-fsdevel@vger.kernel.org>,
	Wu Fengguang <fengguang.wu@intel.com>
Subject: Re: [PATCH 1/2] vfs: make writeback_in_progress() inline
Date: Tue, 06 Dec 2011 13:51:02 +0800	[thread overview]
Message-ID: <4EDDAD46.6020508@cn.fujitsu.com> (raw)
In-Reply-To: <4EDDA9B1.5050000@cn.fujitsu.com>

cc Fengguang
cc Linux-kernel

On tue, 06 Dec 2011 13:35:45 +0800, Miao Xie wrote:
> writeback_in_progress() is very simple, and we will use writeback_in_progress()
> in the module, so make it inline.
> 
> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
> ---
>  fs/fs-writeback.c           |   12 ------------
>  include/linux/backing-dev.h |   12 +++++++++++-
>  2 files changed, 11 insertions(+), 13 deletions(-)
> 
> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> index 04cf3b9..341448c 100644
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -59,18 +59,6 @@ struct wb_writeback_work {
>   */
>  int nr_pdflush_threads;
>  
> -/**
> - * writeback_in_progress - determine whether there is writeback in progress
> - * @bdi: the device's backing_dev_info structure.
> - *
> - * Determine whether there is writeback waiting to be handled against a
> - * backing device.
> - */
> -int writeback_in_progress(struct backing_dev_info *bdi)
> -{
> -	return test_bit(BDI_writeback_running, &bdi->state);
> -}
> -
>  static inline struct backing_dev_info *inode_to_bdi(struct inode *inode)
>  {
>  	struct super_block *sb = inode->i_sb;
> diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
> index 3b2f9cb..ae4d7c0 100644
> --- a/include/linux/backing-dev.h
> +++ b/include/linux/backing-dev.h
> @@ -258,7 +258,17 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);
>  extern struct backing_dev_info default_backing_dev_info;
>  extern struct backing_dev_info noop_backing_dev_info;
>  
> -int writeback_in_progress(struct backing_dev_info *bdi);
> +/**
> + * writeback_in_progress - determine whether there is writeback in progress
> + * @bdi: the device's backing_dev_info structure.
> + *
> + * Determine whether there is writeback waiting to be handled against a
> + * backing device.
> + */
> +static inline int writeback_in_progress(struct backing_dev_info *bdi)
> +{
> +	return test_bit(BDI_writeback_running, &bdi->state);
> +}
>  
>  static inline int bdi_congested(struct backing_dev_info *bdi, int bdi_bits)
>  {


           reply	other threads:[~2011-12-06  5:52 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <4EDDA9B1.5050000@cn.fujitsu.com>]

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=4EDDAD46.6020508@cn.fujitsu.com \
    --to=miaox@cn.fujitsu.com \
    --cc=chris.mason@oracle.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=t-itoh@jp.fujitsu.com \
    --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