linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: remove redundant check of page type when submit bio
@ 2018-02-06  0:21 Tiezhu Yang
  2018-02-07 11:42 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Tiezhu Yang @ 2018-02-06  0:21 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel

This patch removes redundant check of page type when submit bio to
make the logic more clear.

Signed-off-by: Tiezhu Yang <kernelpatch@126.com>
---
 fs/f2fs/data.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 7435830..55f5e8d 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -203,13 +203,12 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
 	if (!is_read_io(bio_op(bio))) {
 		unsigned int start;
 
-		if (f2fs_sb_mounted_blkzoned(sbi->sb) &&
-			current->plug && (type == DATA || type == NODE))
-			blk_finish_plug(current->plug);
-
 		if (type != DATA && type != NODE)
 			goto submit_io;
 
+		if (f2fs_sb_mounted_blkzoned(sbi->sb) && current->plug)
+			blk_finish_plug(current->plug);
+
 		start = bio->bi_iter.bi_size >> F2FS_BLKSIZE_BITS;
 		start %= F2FS_IO_SIZE(sbi);
 
-- 
1.8.3.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

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

* Re: [PATCH] f2fs: remove redundant check of page type when submit bio
  2018-02-06  0:21 [PATCH] f2fs: remove redundant check of page type when submit bio Tiezhu Yang
@ 2018-02-07 11:42 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2018-02-07 11:42 UTC (permalink / raw)
  To: Tiezhu Yang, jaegeuk; +Cc: linux-f2fs-devel

On 2018/2/6 8:21, Tiezhu Yang wrote:
> This patch removes redundant check of page type when submit bio to
> make the logic more clear.
> 
> Signed-off-by: Tiezhu Yang <kernelpatch@126.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

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

end of thread, other threads:[~2018-02-07 11:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-06  0:21 [PATCH] f2fs: remove redundant check of page type when submit bio Tiezhu Yang
2018-02-07 11:42 ` Chao Yu

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