lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 06 Dec 2011 13:51:02 +0800
From:	Miao Xie <miaox@...fujitsu.com>
To:	unlisted-recipients:; (no To-header on input)
CC:	Linux Kernel <linux-kernel@...r.kernel.org>,
	viro <viro@...iv.linux.org.uk>,
	Chris Mason <chris.mason@...cle.com>,
	Ito <t-itoh@...fujitsu.com>,
	Linux Btrfs <linux-btrfs@...r.kernel.org>,
	Linux Fsdevel <linux-fsdevel@...r.kernel.org>,
	Wu Fengguang <fengguang.wu@...el.com>
Subject: Re: [PATCH 1/2] vfs: make writeback_in_progress() inline

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@...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)
>  {

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ