Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753840AbdDLMGf (ORCPT ); Wed, 12 Apr 2017 08:06:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36920 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753447AbdDLMGX (ORCPT ); Wed, 12 Apr 2017 08:06:23 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C1B35EC0A1 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jlayton@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C1B35EC0A1 From: Jeff Layton To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, tytso@mit.edu, jack@suse.cz, willy@infradead.org, neilb@suse.com, viro@zeniv.linux.org.uk Subject: [PATCH v2 06/17] mm: doc comment for scary spot in write_one_page Date: Wed, 12 Apr 2017 08:06:03 -0400 Message-Id: <20170412120614.6111-7-jlayton@redhat.com> In-Reply-To: <20170412120614.6111-1-jlayton@redhat.com> References: <20170412120614.6111-1-jlayton@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 12 Apr 2017 12:06:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 771 Lines: 26 Not sure what to do here just yet. Signed-off-by: Jeff Layton --- mm/page-writeback.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index de0dbf12e2c1..3ac8399dc984 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2388,6 +2388,12 @@ int write_one_page(struct page *page) ret = mapping->a_ops->writepage(page, &wbc); if (ret == 0) { wait_on_page_writeback(page); + /* + * FIXME: is this racy? What guarantees that PG_error + * will still be set once we get around to checking it? + * What if writeback fails, but then a read is issued + * before we check this, and that calls ClearPageError? + */ if (PageError(page)) ret = -EIO; } -- 2.9.3