Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5254368imu; Tue, 15 Jan 2019 14:09:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN4sk5732nStrrD0lbVsnH5O3hjXwNEUWl6GzkUxUDAmdZkbQRVYIlCuSsumH8kIRmg6sr+B X-Received: by 2002:a62:18ce:: with SMTP id 197mr6496154pfy.88.1547590196526; Tue, 15 Jan 2019 14:09:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547590196; cv=none; d=google.com; s=arc-20160816; b=BXKdekhn66Fuz8rZ4EpyP0MIurd1LgJrOTJlab4pFxhHpbscg2og56cjyTRrMnqQeQ kbKb8tpbzlMNwUdfWaLWzGILYGJZKeFV5DVQWjTc7xS17QSxrT9O9OZtNxVX8WHYq1qA SmltgemaGXw7814zxD6z4ZxF9RzkypOIYbLo5bssoSsoZKbaSaEdPRb/GV4TNq6zqV/w f6jT/zfPIi1fSAmC/KuLdKxgjBAwM322LJ3fa5oJMuiAlyBh+b96OGPTCL9iwF+LF7iN jDpkALeID+6skkIByvggjqOHUwgzMnSvRl8+eR3yaxhed8pDKHVtjdkOruo3J2cv9z67 iWzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=no0FifoU6xt1bxmMQGWgHmzL5CFCUU5DMV7jngKD66s=; b=lBpQj6d/Q5+JimjsGgvbJRkn92JPCzC9kVTpRn5aEBKguk/R+ZrL9OOalw7Q/5hL99 z2DvPARcwlp1YtOTEeIJp34D4YDk/K3j0eHiYk6RY6yJ8u6xztAwhJ18h44q9yu0o8Nd 1PFlUbZQvMuMJTK1xzKhXOkfEgbC9cBGTnX6PyGll05Dz424D3pmSCMYRkzfLafZyPd7 nhS0IXop45pigc3uQTNacu7ai6r3mdcf34GCFVG0e2hgqj/aIPLqiy4AAWDn+Nng2T+s 5zMQoPCgnX96qBwYwlu5WCehpzUf0Ibh2chSDB9J5nf7+kIX1ubTWL1DI8T6ugwK7fmr HW4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="OgL/B8+t"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f22si4307793pgm.81.2019.01.15.14.09.40; Tue, 15 Jan 2019 14:09:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="OgL/B8+t"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731369AbfAOQrT (ORCPT + 99 others); Tue, 15 Jan 2019 11:47:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:35326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729219AbfAOQpf (ORCPT ); Tue, 15 Jan 2019 11:45:35 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 74B7A20645; Tue, 15 Jan 2019 16:45:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547570735; bh=uGceRQP/HPWt6RAjs5cr5YoGgzqVK759EHT1rB0tC6A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OgL/B8+txGoRFpKhl5eCruIXDYR5HsV9xveUjWAnFeBIO8mIMuVNWk1R6Z4FaVRV9 5W5vvSCCUhfZPBaA9wVln9ME6CVdOsMYN0ULsrZbGtSUNC6eMvYIZyD4qPHzbBxRDu h9CGLlSYo9TI0jkp5roNmDDXz3c5ry7C0dzHTLNA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Theodore Tso , stable@kernel.org Subject: [PATCH 4.20 51/57] ext4: track writeback errors using the generic tracking infrastructure Date: Tue, 15 Jan 2019 17:36:32 +0100 Message-Id: <20190115154913.872921555@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190115154910.734892368@linuxfoundation.org> References: <20190115154910.734892368@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Theodore Ts'o commit 95cb67138746451cc84cf8e516e14989746e93b0 upstream. We already using mapping_set_error() in fs/ext4/page_io.c, so all we need to do is to use file_check_and_advance_wb_err() when handling fsync() requests in ext4_sync_file(). Signed-off-by: Theodore Ts'o Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman --- fs/ext4/fsync.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c @@ -164,6 +164,9 @@ int ext4_sync_file(struct file *file, lo ret = err; } out: + err = file_check_and_advance_wb_err(file); + if (ret == 0) + ret = err; trace_ext4_sync_file_exit(inode, ret); return ret; }