From patchwork Fri Sep 16 12:19:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miklos Szeredi X-Patchwork-Id: 9335643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E742B6089F for ; Fri, 16 Sep 2016 12:20:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D972A29B76 for ; Fri, 16 Sep 2016 12:20:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDA0C29D50; Fri, 16 Sep 2016 12:20:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E7B829B87 for ; Fri, 16 Sep 2016 12:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935038AbcIPMUQ (ORCPT ); Fri, 16 Sep 2016 08:20:16 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:37743 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934901AbcIPMTu (ORCPT ); Fri, 16 Sep 2016 08:19:50 -0400 Received: by mail-wm0-f45.google.com with SMTP id k186so38183132wmd.0 for ; Fri, 16 Sep 2016 05:19:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=maVXFSrPXsPxg0+cm/wxfZh8ogR5RgOUcI7D476yI+s=; b=TFBYoGuyxbYkDKUdx1LD++0wy9JvDMn72glTN5tO/CvCuZmsWlc4vUCucvRc1OxFxQ K2aqVEI/ZW3VVMVFkT5GUggikVxSx4XoSVEiZI5srkKxu+ZkVbDS0f3X831qRwof3Lg4 AGAKGbhv/CzIXtj6UKFUVE1ebDA16TZuUK/i1V+I79G3B83YEPYYEE1wQXFCdeesh7M5 E72AhUfE2mSzsOw3bbBdZ98ZWaNSbq7ofpuNRguuK+hA+Af2QznjJlrFD59E/KuVdIAb pJLLBWpipRDqCHp3jM8dmpNHJLygR6WJxsBKSbDJeKHVNYa0QvdpeQd+UuxnMBWTPPl2 zgJA== X-Gm-Message-State: AE9vXwPmQcxnxKUIRn75uu0r/ShB8kLKi5vnl3LcxSCI5ELxpv7PacVhF4Y24+XAPxDbD1z1 X-Received: by 10.194.47.101 with SMTP id c5mr13659213wjn.67.1474028388283; Fri, 16 Sep 2016 05:19:48 -0700 (PDT) Received: from veci.piliscsaba.szeredi.hu (4E5CE698.dsl.pool.telekom.hu. [78.92.230.152]) by smtp.gmail.com with ESMTPSA id n7sm8169812wjs.34.2016.09.16.05.19.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Sep 2016 05:19:47 -0700 (PDT) From: Miklos Szeredi To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Al Viro , Jaegeuk Kim Subject: [PATCH 09/12] f2fs: use filemap_check_errors() Date: Fri, 16 Sep 2016 14:19:28 +0200 Message-Id: <1474028371-21288-10-git-send-email-mszeredi@redhat.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1474028371-21288-1-git-send-email-mszeredi@redhat.com> References: <1474028371-21288-1-git-send-email-mszeredi@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Miklos Szeredi Cc: Jaegeuk Kim --- fs/f2fs/node.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index f75d197d5beb..67ed2192f926 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1513,7 +1513,7 @@ int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino) { pgoff_t index = 0, end = ULONG_MAX; struct pagevec pvec; - int ret2 = 0, ret = 0; + int ret2, ret = 0; pagevec_init(&pvec, 0); @@ -1542,10 +1542,7 @@ int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino) cond_resched(); } - if (unlikely(test_and_clear_bit(AS_ENOSPC, &NODE_MAPPING(sbi)->flags))) - ret2 = -ENOSPC; - if (unlikely(test_and_clear_bit(AS_EIO, &NODE_MAPPING(sbi)->flags))) - ret2 = -EIO; + ret2 = filemap_check_errors(NODE_MAPPING(sbi)); if (!ret) ret = ret2; return ret;