linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext2: code cleanup for ext2_preread_inode()
@ 2019-05-28  5:32 Chengguang Xu
  2019-05-28  7:52 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2019-05-28  5:32 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4, Chengguang Xu

Calling bdi_rw_congested() instead of calling
bdi_read_congested() and bdi_write_congested().

Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn>
---
 fs/ext2/ialloc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index a0c5ea91fcd4..334dea4e499d 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -172,9 +172,7 @@ static void ext2_preread_inode(struct inode *inode)
 	struct backing_dev_info *bdi;
 
 	bdi = inode_to_bdi(inode);
-	if (bdi_read_congested(bdi))
-		return;
-	if (bdi_write_congested(bdi))
+	if (bdi_rw_congested(bdi))
 		return;
 
 	block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb);
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext2: code cleanup for ext2_preread_inode()
  2019-05-28  5:32 [PATCH] ext2: code cleanup for ext2_preread_inode() Chengguang Xu
@ 2019-05-28  7:52 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2019-05-28  7:52 UTC (permalink / raw)
  To: Chengguang Xu; +Cc: jack, linux-ext4

On Tue 28-05-19 13:32:31, Chengguang Xu wrote:
> Calling bdi_rw_congested() instead of calling
> bdi_read_congested() and bdi_write_congested().
> 
> Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn>

Thanks! Applied.

							Honza

> ---
>  fs/ext2/ialloc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
> index a0c5ea91fcd4..334dea4e499d 100644
> --- a/fs/ext2/ialloc.c
> +++ b/fs/ext2/ialloc.c
> @@ -172,9 +172,7 @@ static void ext2_preread_inode(struct inode *inode)
>  	struct backing_dev_info *bdi;
>  
>  	bdi = inode_to_bdi(inode);
> -	if (bdi_read_congested(bdi))
> -		return;
> -	if (bdi_write_congested(bdi))
> +	if (bdi_rw_congested(bdi))
>  		return;
>  
>  	block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb);
> -- 
> 2.20.1
> 
> 
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-28  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-28  5:32 [PATCH] ext2: code cleanup for ext2_preread_inode() Chengguang Xu
2019-05-28  7:52 ` Jan Kara

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