Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3685907ioa; Tue, 26 Apr 2022 08:13:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9WUKFS4tBu3MOkgI1wXZ/nuJFszRIMwD+wCh8U5o1DCYZWZUK58nsH7XbvI4+enE/y2SJ X-Received: by 2002:a17:907:6e15:b0:6f3:754c:4390 with SMTP id sd21-20020a1709076e1500b006f3754c4390mr15036584ejc.66.1650986019251; Tue, 26 Apr 2022 08:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650986019; cv=none; d=google.com; s=arc-20160816; b=G4DgR0tYgUVw0qnunfBchXaxy55fjucEj9Sml/CwJxU8HR4C+dHS9RU9Rlv70AUJjn bfqb/39/pIkrGuE0eKLE7upfn6Y0v6+bw0Opf3nEeapRBkhLO5g04QbOUMt/vEDPl4xs BavnjgHdlTLFBsJZRW3tM7TL6lY09lepCoN1vLabFVDQo5UNtN1ZKDJVbpfqxZZ6XUnh TsDqqQj83bNbHzKEfpJvuCPL8xR3E7Gba7xTh/0lX3tlCTgXSDJUPQSmAcrL/BdIhkQ0 Fsdfo7BfhXTOhvkSGu91KCqiNjiTGwevjuyncAIMczmzLwi57UUHoDN8O0MDlHKTMnGQ 3SCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wx3TQuz8YvPrqPWCunCLIkasL8HE6O9yvCrEDIv8pN8=; b=YrYrCtlG2ozI05OvcVHgL7UhIGpqzIDKJgCc+B6mwgt2ZAPcnsVCgn+EDirmd+3kh1 emg3gQfNDwp+QvvtO0K1KJgOvqmivWU53LbseJfiiDTKZ96FFD++v+ETeJwIgO43xe2m P3lqbwZuP7k2rz72P1hMjaO9uP+jUONwZxEOXjrCd4QOla9ugY3sz+/6X6FdtFDJbdvU lZpEhvKu4wBtZtTO76LtwkgccS4yZsFz6jFpn0PQsmrxTQqMbMbsyxI/dASfAoicliv5 vu+R+uZA5XgncKh2R2ANmB6NAe8iEHiPiO0VX/bdXvG4CY6HfFCNTsjWEz2ojheLCUah EIwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QQbZW3KM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a056402440900b0042600b03337si831224eda.469.2022.04.26.08.13.14; Tue, 26 Apr 2022 08:13:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QQbZW3KM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241730AbiDZJHB (ORCPT + 99 others); Tue, 26 Apr 2022 05:07:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345710AbiDZIrP (ORCPT ); Tue, 26 Apr 2022 04:47:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 711A892D19; Tue, 26 Apr 2022 01:37:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F0409B81D0B; Tue, 26 Apr 2022 08:37:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D00CC385AC; Tue, 26 Apr 2022 08:37:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962258; bh=bvhqsEbkDYaKpMcE1ev3Jt21CwVF4ZE9B9Viij96CTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QQbZW3KMO+wQTC9LYZYsqtYfhoIBzx7ZeoYo3Tn4L87lRO5+QUJde7s9a4HQwiGgS OEl6uavVCAJ8RcyGCUKIBMD+xxIibF6tHl/tglHSjDrELZSNzPY4sKCHES/jYuNd+Y eVXK34xsojJPT++IAbxKygubRbILnKm9isRKslCw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Darrick J. Wong" , Jan Kara , Christoph Hellwig , Christian Brauner , Sasha Levin Subject: [PATCH 5.15 005/124] xfs: return errors in xfs_fs_sync_fs Date: Tue, 26 Apr 2022 10:20:06 +0200 Message-Id: <20220426081747.446618645@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081747.286685339@linuxfoundation.org> References: <20220426081747.286685339@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Darrick J. Wong [ Upstream commit 2d86293c70750e4331e9616aded33ab6b47c299d ] Now that the VFS will do something with the return values from ->sync_fs, make ours pass on error codes. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner Signed-off-by: Sasha Levin --- fs/xfs/xfs_super.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -729,6 +729,7 @@ xfs_fs_sync_fs( int wait) { struct xfs_mount *mp = XFS_M(sb); + int error; trace_xfs_fs_sync_fs(mp, __return_address); @@ -738,7 +739,10 @@ xfs_fs_sync_fs( if (!wait) return 0; - xfs_log_force(mp, XFS_LOG_SYNC); + error = xfs_log_force(mp, XFS_LOG_SYNC); + if (error) + return error; + if (laptop_mode) { /* * The disk must be active because we're syncing.