From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-fw-80006.amazon.com (smtp-fw-80006.amazon.com [99.78.197.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 335BF1474BF for ; Wed, 3 Apr 2024 13:01:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=99.78.197.217 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712149284; cv=none; b=ky+7siQQ0Usl58diBTPL3muW4NHOBs46qPvcP//yNzpCvRlDIJ3mJQs7WYXIKNY7dF6i6gUD/YDMBvJae7/c9Ide0U/dQshs0mtyIQoFi438BN9NrVtQEH3ZGSOD3+y2p9gD2Hs6ch0Ka+Rkyyl8AmPU0erHcHzz7pkrGnaBmb0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712149284; c=relaxed/simple; bh=+XsVFSiqH8wLBlVHqe4Iy4QZIsx6Uqp+woPEoODMS4M=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rdpVzyCu5TGjZ+zrsCaFwOSPzwRKrcc+UOHJeJLXTfL9diHT+khSuNmHqgBMA9/chtEUMZU7VxYE6BXWYiqI0I0MVnw71TmgtOGJCMRFTCm2QuiFiIX99r+M/cSKtDPK+a+cerA9Ubad3Zcx0lPhqmCHtI2v3Y7ADEqssfsckCw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b=hwJ8AII2; arc=none smtp.client-ip=99.78.197.217 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="hwJ8AII2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1712149284; x=1743685284; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pBtKNTZfJqkErPJGBgP/uGQTI2ctK6ye6TpNk+go1no=; b=hwJ8AII2BQ/dKC7j+sTOVWsk1QLwm56heqrbc3b8At0XurgazI7lIRbv teQxtHYs26qDtz5yxxBnPgXfuo7vIEGCgtEGAwTrLriIuEmMC1gp/XGtj rBH/bwOW+vaa96kqZgmbpcLCRbocWODEFHUdLM4Zmrn5zYz3ABWXbxtsB c=; X-IronPort-AV: E=Sophos;i="6.07,177,1708387200"; d="scan'208";a="284905443" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.25.36.214]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 13:01:13 +0000 Received: from EX19MTAUWB002.ant.amazon.com [10.0.38.20:29569] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.49.69:2525] with esmtp (Farcaster) id 50ec6633-0a4e-491a-9b5f-d0a04af0b1db; Wed, 3 Apr 2024 13:01:12 +0000 (UTC) X-Farcaster-Flow-ID: 50ec6633-0a4e-491a-9b5f-d0a04af0b1db Received: from EX19EXOUWC001.ant.amazon.com (10.250.64.135) by EX19MTAUWB002.ant.amazon.com (10.250.64.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 3 Apr 2024 13:01:12 +0000 Received: from EX19MTAUWA001.ant.amazon.com (10.250.64.204) by EX19EXOUWC001.ant.amazon.com (10.250.64.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 3 Apr 2024 13:01:12 +0000 Received: from dev-dsk-mngyadam-1c-a2602c62.eu-west-1.amazon.com (10.15.1.225) by mail-relay.amazon.com (10.250.64.204) with Microsoft SMTP Server id 15.2.1258.28 via Frontend Transport; Wed, 3 Apr 2024 13:01:11 +0000 Received: by dev-dsk-mngyadam-1c-a2602c62.eu-west-1.amazon.com (Postfix, from userid 23907357) id 6A349BE6; Wed, 3 Apr 2024 15:01:11 +0200 (CEST) From: Mahmoud Adam To: CC: , Subject: [PATCH 6.1 3/6] xfs: get root inode correctly at bulkstat Date: Wed, 3 Apr 2024 14:59:51 +0200 Message-ID: <20240403125949.33676-4-mngyadam@amazon.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240403125949.33676-1-mngyadam@amazon.com> References: <20240403125949.33676-1-mngyadam@amazon.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain From: Hironori Shiina commit 817644fa4525258992f17fecf4f1d6cdd2e1b731 upstream. The root inode number should be set to `breq->startino` for getting stat information of the root when XFS_BULK_IREQ_SPECIAL_ROOT is used. Otherwise, the inode search is started from 1 (XFS_BULK_IREQ_SPECIAL_ROOT) and the inode with the lowest number in a filesystem is returned. Fixes: bf3cb3944792 ("xfs: allow single bulkstat of special inodes") Signed-off-by: Hironori Shiina Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Mahmoud Adam --- fs/xfs/xfs_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 1f783e979629..85fbb3b71d1c 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -754,7 +754,7 @@ xfs_bulkstat_fmt( static int xfs_bulk_ireq_setup( struct xfs_mount *mp, - struct xfs_bulk_ireq *hdr, + const struct xfs_bulk_ireq *hdr, struct xfs_ibulk *breq, void __user *ubuffer) { @@ -780,7 +780,7 @@ xfs_bulk_ireq_setup( switch (hdr->ino) { case XFS_BULK_IREQ_SPECIAL_ROOT: - hdr->ino = mp->m_sb.sb_rootino; + breq->startino = mp->m_sb.sb_rootino; break; default: return -EINVAL; -- 2.40.1