From patchwork Mon Feb 25 17:41:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10828977 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 988EE17E9 for ; Mon, 25 Feb 2019 17:41:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EFDA2B283 for ; Mon, 25 Feb 2019 17:41:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 738592B77B; Mon, 25 Feb 2019 17:41:43 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 26D5C2B283 for ; Mon, 25 Feb 2019 17:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728761AbfBYRll (ORCPT ); Mon, 25 Feb 2019 12:41:41 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:47956 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728796AbfBYRlj (ORCPT ); Mon, 25 Feb 2019 12:41:39 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1PHcWju114466 for ; Mon, 25 Feb 2019 17:41:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=Gxeq0cxqiae7gyOW82aFNUJyJkxWHgNMrzPSzf4Fg3Y=; b=oklsW1dC+eWZ8KFdw/1MwYzcaOZ0mUBAKBdTv9zKJAq1zzeXORcJNZVC2cfqyWIWgKL7 rrf8SV5Pnz/sD51KL6Zesw2eteCL7qxlGq3wTq0lLBV8jpVhDaMXng6KpEEIdjhLUz8f w29gpUIkD+AjHI09ZfxS5nE9CWIIwC30PH6PonsAexl3ZeHIveSciYmOlsY+8PQDlaYY wpkR7QvY1ZEyfus0yWtBSOzLldNi6wfAk07n8g0Zg7riXBLhljOwbfvAyGZU+RfuLden WNpCNsoj4EQMJUx054XcszNzKJpM4FO8R5jUv3l2MudvGlkj/k9ZFqy93Qn91FfPNx2L mw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2qtwktym9e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 25 Feb 2019 17:41:37 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x1PHfaES001516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 25 Feb 2019 17:41:37 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x1PHfaPI032683 for ; Mon, 25 Feb 2019 17:41:36 GMT Received: from localhost (/10.159.153.131) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 25 Feb 2019 09:41:36 -0800 Subject: [PATCH 1/2] xfs: fix uninitialized error variables From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Mon, 25 Feb 2019 09:41:35 -0800 Message-ID: <155111649548.15126.8995811550165658297.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9178 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=923 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902250130 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong smatch complained about some uninitialized error returns, so fix those. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson --- fs/xfs/libxfs/xfs_sb.c | 2 +- fs/xfs/xfs_reflink.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c index 4e5029c37966..77a3a4085de3 100644 --- a/fs/xfs/libxfs/xfs_sb.c +++ b/fs/xfs/libxfs/xfs_sb.c @@ -877,7 +877,7 @@ xfs_initialize_perag_data( uint64_t bfreelst = 0; uint64_t btree = 0; uint64_t fdblocks; - int error; + int error = 0; for (index = 0; index < agcount; index++) { /* diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index d42e3ef9050e..680ae7662a78 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -261,7 +261,7 @@ xfs_reflink_convert_cow_locked( struct xfs_bmbt_irec got; struct xfs_btree_cur *dummy_cur = NULL; int dummy_logflags; - int error; + int error = 0; if (!xfs_iext_lookup_extent(ip, ip->i_cowfp, offset_fsb, &icur, &got)) return 0; From patchwork Mon Feb 25 17:41:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10828979 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA7F717E9 for ; Mon, 25 Feb 2019 17:41:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B38322B73D for ; Mon, 25 Feb 2019 17:41:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4D542B791; Mon, 25 Feb 2019 17:41:52 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 9845D2B73D for ; Mon, 25 Feb 2019 17:41:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726559AbfBYRlv (ORCPT ); Mon, 25 Feb 2019 12:41:51 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:48480 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726225AbfBYRlv (ORCPT ); Mon, 25 Feb 2019 12:41:51 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1PHceup121214 for ; Mon, 25 Feb 2019 17:41:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=ksKra/aMIvgP1A47iEutNJdx6T1Jc/ghBmSoIzQIha0=; b=qN2nYTwi+RRhxAoli5+LmOopCr/Dp9PsDwCq97X/bLGWBb1cLinPe6WGIkO8SRbktOgj 7g3QcehSKkhkWxbIfI++MnK1mo9xNh6v9WCdK0XgrIVVrkoO9av0M9rtc2LipVk4lX6Y 4uqv5W7vqFAuRfMOzDLdnbLEmjfQzI5sF/OhUotoD/tsz9nL+SngrBW0G6/oJ8rXe6ax ztpbOedcn+jYvHVo9nN2N0zIM0o/kAKu9Infrz2m35m1Ukm9OENh45d+iUzoZkXJNKfk +4TUYcaduJ005idTb5dl60TT8d2S4h7KAeyADJq8FzID0EYEHMiBUZUP9uaV1IqyXb8z rA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2qtxtrfh4u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 25 Feb 2019 17:41:49 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1PHfhDZ026130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 25 Feb 2019 17:41:43 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1PHfhOB014780 for ; Mon, 25 Feb 2019 17:41:43 GMT Received: from localhost (/10.159.153.131) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 25 Feb 2019 09:41:42 -0800 Subject: [PATCH 2/2] xfs: fix backwards endian conversion in scrub From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Mon, 25 Feb 2019 09:41:41 -0800 Message-ID: <155111650186.15126.5896442701967175896.stgit@magnolia> In-Reply-To: <155111649548.15126.8995811550165658297.stgit@magnolia> References: <155111649548.15126.8995811550165658297.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9178 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=942 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902250130 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Fix a backwards endian conversion of a constant. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson --- fs/xfs/scrub/agheader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/scrub/agheader.c b/fs/xfs/scrub/agheader.c index 9d4e8293d37e..ddf06bfaa29d 100644 --- a/fs/xfs/scrub/agheader.c +++ b/fs/xfs/scrub/agheader.c @@ -399,7 +399,7 @@ xchk_agf_xref_cntbt( if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) return; if (!have) { - if (agf->agf_freeblks != be32_to_cpu(0)) + if (agf->agf_freeblks != cpu_to_be32(0)) xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); return; }