linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: <jaegeuk@kernel.org>
Cc: <linux-f2fs-devel@lists.sourceforge.net>,
	<linux-kernel@vger.kernel.org>, <chao@kernel.org>,
	Chao Yu <yuchao0@huawei.com>
Subject: [PATCH 12/13] f2fs: fix to set FI_UPDATE_WRITE correctly
Date: Mon, 15 Apr 2019 15:30:53 +0800	[thread overview]
Message-ID: <20190415073054.2577-4-yuchao0@huawei.com> (raw)
In-Reply-To: <20190415073054.2577-1-yuchao0@huawei.com>

This patch fixes to set FI_UPDATE_WRITE only if in-place IO was issued.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/data.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index ee5c7962b0f3..f6191b5a0e48 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1879,9 +1879,10 @@ int f2fs_do_write_data_page(struct f2fs_io_info *fio)
 									true);
 			if (PageWriteback(page))
 				end_page_writeback(page);
+		} else {
+			set_inode_flag(inode, FI_UPDATE_WRITE);
 		}
 		trace_f2fs_do_write_data_page(fio->page, IPU);
-		set_inode_flag(inode, FI_UPDATE_WRITE);
 		return err;
 	}
 
-- 
2.18.0.rc1


  parent reply	other threads:[~2019-04-15  7:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  7:30 [PATCH 09/13] f2fs: fix to do sanity check on valid node/block count Chao Yu
2019-04-15  7:30 ` [PATCH 10/13] f2fs: fix to do sanity check on valid block count of segment Chao Yu
2019-04-15  7:30 ` [PATCH 11/13] f2fs: fix to avoid panic in f2fs_inplace_write_data() Chao Yu
2019-04-15  7:30 ` Chao Yu [this message]
2019-04-15  7:30 ` [PATCH 13/13] f2fs: don't recovery orphan inode on readonly device Chao Yu
2019-04-15  8:10   ` [f2fs-dev] " Ju Hyung Park
2019-04-15  8:56     ` Chao Yu
2019-04-15 11:04       ` Ju Hyung Park
2019-04-15 11:31         ` Chao Yu

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=20190415073054.2577-4-yuchao0@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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).