<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/gfs2, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-08-20T16:35:51Z</updated>
<entry>
<title>gfs2: Set .migrate_folio in gfs2_{rgrp,meta}_aops</title>
<updated>2025-08-20T16:35:51Z</updated>
<author>
<name>Andrew Price</name>
</author>
<published>2025-07-14T15:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9f745095c382b76e68407fd6f15ef27baf2a013f'/>
<id>urn:sha1:9f745095c382b76e68407fd6f15ef27baf2a013f</id>
<content type='text'>
[ Upstream commit 5c8f12cf1e64e0e8e6cb80b0c935389973e8be8d ]

Clears up the warning added in 7ee3647243e5 ("migrate: Remove call to
-&gt;writepage") that occurs in various xfstests, causing "something found
in dmesg" failures.

[  341.136573] gfs2_meta_aops does not implement migrate_folio
[  341.136953] WARNING: CPU: 1 PID: 36 at mm/migrate.c:944 move_to_new_folio+0x2f8/0x300

Signed-off-by: Andrew Price &lt;anprice@redhat.com&gt;
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gfs2: Validate i_depth for exhash directories</title>
<updated>2025-08-20T16:35:51Z</updated>
<author>
<name>Andrew Price</name>
</author>
<published>2025-07-16T13:12:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5f46951e62377b6e406fadc18bc3c5bdf1632a7'/>
<id>urn:sha1:b5f46951e62377b6e406fadc18bc3c5bdf1632a7</id>
<content type='text'>
[ Upstream commit 557c024ca7250bb65ae60f16c02074106c2f197b ]

A fuzzer test introduced corruption that ends up with a depth of 0 in
dir_e_read(), causing an undefined shift by 32 at:

  index = hash &gt;&gt; (32 - dip-&gt;i_depth);

As calculated in an open-coded way in dir_make_exhash(), the minimum
depth for an exhash directory is ilog2(sdp-&gt;sd_hash_ptrs) and 0 is
invalid as sdp-&gt;sd_hash_ptrs is fixed as sdp-&gt;bsize / 16 at mount time.

So we can avoid the undefined behaviour by checking for depth values
lower than the minimum in gfs2_dinode_in(). Values greater than the
maximum are already being checked for there.

Also switch the calculation in dir_make_exhash() to use ilog2() to
clarify how the depth is calculated.

Tested with the syzkaller repro.c and xfstests '-g quick'.

Reported-by: syzbot+4708579bb230a0582a57@syzkaller.appspotmail.com
Signed-off-by: Andrew Price &lt;anprice@redhat.com&gt;
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gfs2: No more self recovery</title>
<updated>2025-08-15T10:16:14Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-07-16T21:30:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6784367b2f3cd7b89103de35764f37f152590dbd'/>
<id>urn:sha1:6784367b2f3cd7b89103de35764f37f152590dbd</id>
<content type='text'>
[ Upstream commit deb016c1669002e48c431d6fd32ea1c20ef41756 ]

When a node withdraws and it turns out that it is the only node that has
the filesystem mounted, gfs2 currently tries to replay the local journal
to bring the filesystem back into a consistent state.  Not only is that
a very bad idea, it has also never worked because gfs2_recover_func()
will refuse to do anything during a withdraw.

However, before even getting to this point, gfs2_recover_func()
dereferences sdp-&gt;sd_jdesc-&gt;jd_inode.  This was a use-after-free before
commit 04133b607a78 ("gfs2: Prevent double iput for journal on error")
and is a NULL pointer dereference since then.

Simply get rid of self recovery to fix that.

Fixes: 601ef0d52e96 ("gfs2: Force withdraw to replay journals and wait for it to finish")
Reported-by: Chunjie Zhu &lt;chunjie.zhu@cloud.com&gt;
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gfs2: Minor do_xmote cancelation fix</title>
<updated>2025-08-15T10:16:14Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-07-08T19:21:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71642c886185082b1a9646e3a93836eeabb41234'/>
<id>urn:sha1:71642c886185082b1a9646e3a93836eeabb41234</id>
<content type='text'>
[ Upstream commit 75bb2ddea9640b663e4b2eaa06e15196f6f11a95 ]

Commit 6cb3b1c2df87 changed how finish_xmote() clears the GLF_LOCK flag,
but it failed to adjust the equivalent code in do_xmote().  Fix that.

Fixes: 6cb3b1c2df87 ("gfs2: Fix additional unlikely request cancelation race")
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gfs2: move msleep to sleepable context</title>
<updated>2025-06-27T10:12:54Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2025-03-31T23:03:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=507c1a81ab4c14bb2a45339793a1114919913f46'/>
<id>urn:sha1:507c1a81ab4c14bb2a45339793a1114919913f46</id>
<content type='text'>
commit ac5ee087d31ed93b6e45d2968a66828c6f621d8c upstream.

This patch moves the msleep_interruptible() out of the non-sleepable
context by moving the ls-&gt;ls_recover_spin spinlock around so
msleep_interruptible() will be called in a sleepable context.

Cc: stable@vger.kernel.org
Fixes: 4a7727725dc7 ("GFS2: Fix recovery issues for spectators")
Suggested-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gfs2: Don't clear sb-&gt;s_fs_info in gfs2_sys_fs_add</title>
<updated>2025-06-19T13:41:08Z</updated>
<author>
<name>Andrew Price</name>
</author>
<published>2025-05-28T15:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41ccd0006344dbe67c5c1fbdd5c6efc622e66314'/>
<id>urn:sha1:41ccd0006344dbe67c5c1fbdd5c6efc622e66314</id>
<content type='text'>
commit 9126d2754c5e5d1818765811a10af0a14cf1fa0a upstream.

When gfs2_sys_fs_add() fails, it sets sb-&gt;s_fs_info to NULL on its error
path (see commit 0d515210b696 ("GFS2: Add kobject release method")).
The intention seems to be to prevent dereferencing sb-&gt;s_fs_info once
the object pointed to has been deallocated, but that would be better
achieved by setting the pointer to NULL in free_sbd().

As a consequence, when the call to gfs2_sys_fs_add() fails in
gfs2_fill_super(), sdp = GFS2_SB(inode) will evaluate to NULL in iput()
-&gt; gfs2_drop_inode(), and accessing sdp-&gt;sd_flags will be a NULL pointer
dereference.

Fix that by only setting sb-&gt;s_fs_info to NULL when actually freeing the
object pointed to in free_sbd().

Fixes: ae9f3bd8259a ("gfs2: replace sd_aspace with sd_inode")
Reported-by: syzbot+b12826218502df019f9d@syzkaller.appspotmail.com
Signed-off-by: Andrew Price &lt;anprice@redhat.com&gt;
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gfs2: pass through holder from the VFS for freeze/thaw</title>
<updated>2025-06-19T13:41:00Z</updated>
<author>
<name>Christian Brauner</name>
</author>
<published>2025-04-04T19:02:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2df944842ecdaa72b5d9124247f3b0de030ae06a'/>
<id>urn:sha1:2df944842ecdaa72b5d9124247f3b0de030ae06a</id>
<content type='text'>
[ Upstream commit 62a2175ddf7e72941868f164b7c1f92e00f213bd ]

The filesystem's freeze/thaw functions can be called from contexts where
the holder isn't userspace but the kernel, e.g., during systemd
suspend/hibernate. So pass through the freeze/thaw flags from the VFS
instead of hard-coding them.

Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gfs2: Don't start unnecessary transactions during log flush</title>
<updated>2025-06-19T13:39:22Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-03-28T21:47:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2be0abcf8fef614c615e4de4b6a622632c953583'/>
<id>urn:sha1:2be0abcf8fef614c615e4de4b6a622632c953583</id>
<content type='text'>
[ Upstream commit 5a90f8d499225512a385585ffe3e28f687263d47 ]

Commit 8d391972ae2d ("gfs2: Remove __gfs2_writepage()") changed the log
flush code in gfs2_ail1_start_one() to call aops-&gt;writepages() instead
of aops-&gt;writepage().  For jdata inodes, this means that we will now try
to reserve log space and start a transaction before we can determine
that the pages in question have already been journaled.  When this
happens in the context of gfs2_logd(), it can now appear that not enough
log space is available for freeing up log space, and we will lock up.

Fix that by issuing journal writes directly instead of going through
aops-&gt;writepages() in the log flush code.

Fixes: 8d391972ae2d ("gfs2: Remove __gfs2_writepage()")
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gfs2: Move gfs2_trans_add_databufs</title>
<updated>2025-06-19T13:39:22Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-03-26T21:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5b50bfc177eac3e5eaaa5205b5ed6e70810bebc'/>
<id>urn:sha1:a5b50bfc177eac3e5eaaa5205b5ed6e70810bebc</id>
<content type='text'>
[ Upstream commit d50a64e3c55e59e45e415c65531b0d76ad4cea36 ]

Move gfs2_trans_add_databufs() to trans.c.  Pass in a glock instead of
a gfs2_inode.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Stable-dep-of: 5a90f8d49922 ("gfs2: Don't start unnecessary transactions during log flush")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gfs2: deallocate inodes in gfs2_create_inode</title>
<updated>2025-06-19T13:39:17Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-04-18T14:41:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7887a8e503de6a09ea6d02993aca77037f969466'/>
<id>urn:sha1:7887a8e503de6a09ea6d02993aca77037f969466</id>
<content type='text'>
[ Upstream commit 2c63986dd35fa9eb0d7d1530b5eb2244b7296e22 ]

When creating and destroying inodes, we are relying on the inode hash
table to make sure that for a given inode number, only a single inode
will exist.  We then link that inode to its inode and iopen glock and
let those glocks point back at the inode.  However, when iget_failed()
is called, the inode is removed from the inode hash table before
gfs_evict_inode() is called, and uniqueness is no longer guaranteed.

Commit f1046a472b70 ("gfs2: gl_object races fix") was trying to work
around that problem by detaching the inode glock from the inode before
calling iget_failed(), but that broke the inode deallocation code in
gfs_evict_inode().

To fix that, deallocate partially created inodes in gfs2_create_inode()
instead of relying on gfs_evict_inode() for doing that.

This means that gfs2_evict_inode() and its helper functions will no
longer see partially created inodes, and so some simplifications are
possible there.

Fixes: 9ffa18884cce ("gfs2: gl_object races fix")
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
