From nobody Sat Feb 7 15:11:01 2026 Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66AB221256C for ; Sat, 27 Dec 2025 16:44:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766853885; cv=none; b=TYSucVh/0XVgqYmN3ZkGogJJT2udYDvw+Bczx1+v+dvgen1/98KrBU9Twm3Pl/h9ns5b70dVlVc/3d0QOGXma1SfJSI9263a2VyEytt5QvqRKO4bdATNqkFkXX/W8eaMrxMhvLMCstpK98bOP2OSLZB2oUI/OMy85bwlxXe3xR8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766853885; c=relaxed/simple; bh=3BerM/9qs6bNRwJAsBcOMFOAw0xKnHq+3GScbkZcavo=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=Kku4X9r0tesOqQpSK9W5Kz95Su01dAg0JRoZ0u4QJallAUnaF23rmTzoilAbs8Epo3UhdXRaay8faimDt/iqloxQ2osQC4UkiTqZb/maW5JY5Vm5uE+fT3MMKI677xa/pwNzGqjFtEYua+3K1EcasBAl5aiBjjhrg6sfIvgK8xg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.210.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-ot1-f72.google.com with SMTP id 46e09a7af769-7c75b4d04acso19438940a34.2 for ; Sat, 27 Dec 2025 08:44:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766853882; x=1767458682; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=C64DmdjpkXAJxTFJnli6UCpp20cfGftioZ+UoE9vtOo=; b=QzSPOd02DUIixyIn+pPrYSMFyOWSGaI0IsmeBF32/5qPSn6MDa0VLDrex0pSV4uODv PG3+WjmoeIv2n3Mq5m3Jf4YS/bDdG7g9LNK95LvqdtDaZT80pFPyEChgrmi3sPhGKsHW BT8R+3OAcyzx68jQRAFH5oA5NajdghnufLi14i+lxztDB2KCzhW02D6eGPAQLH+NCVHy vMre8/ISxWJ0ltD4RX+xu9swqvs97ixg7Qk8O4agY0kHQ992yQ6TafdiT21FYBoc3ZY8 nn9OG5xfQCeCLTGjNQazZF0yKXVIlZVi9PzVpoeZyZ8j7koBCTRmPEhaOvFm7mGgtckV egcw== X-Gm-Message-State: AOJu0Yx62aAOaNLzzjAT8ThInt4usxxYNNo0qC+o4RJt8ocMbUT5MRPP AbHL2mJM5Sn12f1vkQ13ZioXy9+LNnnpdNRgyur1DsPe3keR1zlgNtY2EyVnV4CVoua1OCpxTrY h9+XYlPNz+R7oqG5H+n7emfQcKZxyI23iC88S3BXkDV3pxGAN5Jo/7XhVVic= X-Google-Smtp-Source: AGHT+IEQengsabwPc7IbVSJTupaJ8kOwoqpU4OGwdX9F59Hm/+kn1vggddO03FdnGpofHqtdWWUMle1xVOvhJy1stOAasCp8OqgB Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:827:b0:659:9a49:8f93 with SMTP id 006d021491bc7-65d0e9fe02bmr11188897eaf.12.1766853882365; Sat, 27 Dec 2025 08:44:42 -0800 (PST) Date: Sat, 27 Dec 2025 08:44:42 -0800 In-Reply-To: <66fa0328.050a0220.6bad9.002c.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69500cfa.050a0220.35954c.0091.GAE@google.com> Subject: Forwarded: OCFS2 fix test From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: OCFS2 fix test Author: swilczek.lx@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index e85b1ccf81be..136aaaae27f3 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c @@ -821,6 +821,19 @@ static int ocfs2_acquire_dquot(struct dquot *dquot) trace_ocfs2_acquire_dquot(from_kqid(&init_user_ns, dquot->dq_id), type); mutex_lock(&dquot->dq_lock); + /* + * Extend global quota file before acquiring global qf lock to avoid + * lock inversion with sb_internal (via ocfs2_start_trans). + */ + if (need_alloc) { + WARN_ON(journal_current_handle()); + status =3D ocfs2_extend_no_holes(gqinode, NULL, + i_size_read(gqinode) + (need_alloc << sb->s_blocksize_bits), + i_size_read(gqinode)); + if (status < 0) + goto out; + } + /* * We need an exclusive lock, because we're going to update use count * and instantiate possibly new dquot structure @@ -843,19 +856,8 @@ static int ocfs2_acquire_dquot(struct dquot *dquot) OCFS2_DQUOT(dquot)->dq_use_count++; OCFS2_DQUOT(dquot)->dq_origspace =3D dquot->dq_dqb.dqb_curspace; OCFS2_DQUOT(dquot)->dq_originodes =3D dquot->dq_dqb.dqb_curinodes; - if (!dquot->dq_off) { /* No real quota entry? */ + if (!dquot->dq_off) /* No real quota entry? */ ex =3D 1; - /* - * Add blocks to quota file before we start a transaction since - * locking allocators ranks above a transaction start - */ - WARN_ON(journal_current_handle()); - status =3D ocfs2_extend_no_holes(gqinode, NULL, - i_size_read(gqinode) + (need_alloc << sb->s_blocksize_bits), - i_size_read(gqinode)); - if (status < 0) - goto out_dq; - } handle =3D ocfs2_start_trans(osb, ocfs2_calc_global_qinit_credits(sb, type));