<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/gfs2/log.c, branch v7.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-04-07T20:20:00+00:00</updated>
<entry>
<title>gfs2: prevent NULL pointer dereference during unmount</title>
<updated>2026-04-07T20:20:00+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2026-04-07T10:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=74b4dbb946060a3233604d91859a9abd3708141d'/>
<id>urn:sha1:74b4dbb946060a3233604d91859a9abd3708141d</id>
<content type='text'>
When flushing out outstanding glock work during an unmount, gfs2_log_flush()
can be called when sdp-&gt;sd_jdesc has already been deallocated and sdp-&gt;sd_jdesc
is NULL.  Commit 35264909e9d1 ("gfs2: Fix NULL pointer dereference in
gfs2_log_flush") added a check for that to gfs2_log_flush() itself, but it
missed the sdp-&gt;sd_jdesc dereference in gfs2_log_release().  Fix that.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Closes: https://lore.kernel.org/r/202604071139.HNJiCaAi-lkp@intel.com/
Fixes: 35264909e9d1 ("gfs2: Fix NULL pointer dereference in gfs2_log_flush")
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: gfs2_log_flush withdraw fixes</title>
<updated>2026-04-07T20:20:00+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2026-04-05T14:33:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb47cce7a1eea1d9d165260328270ddc39e19526'/>
<id>urn:sha1:bb47cce7a1eea1d9d165260328270ddc39e19526</id>
<content type='text'>
When a withdraw occurs in gfs2_log_flush() and we are left with an unsubmitted
bio, fail that bio.  Otherwise, the bh's in that bio will remain locked and
gfs2_evict_inode() -&gt; truncate_inode_pages() -&gt; gfs2_invalidate_folio() -&gt;
gfs2_discard() will hang trying to discard the locked bh's.

In addition, when gfs2_log_flush() fails to submit a new transaction, unpin the
buffers in the failing transaction like gfs2_remove_from_journal() does.  If
any of the bd's are on the ail2 list, leave them there and do_withdraw() -&gt;
gfs2_withdraw_glocks() -&gt; inode_go_inval() -&gt; truncate_inode_pages() -&gt;
gfs2_invalidate_folio() -&gt; gfs2_discard() will remove them.  They will be freed
in gfs2_release_folio().

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: add some missing log locking</title>
<updated>2026-04-07T20:20:00+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2026-03-31T04:13:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe2c8d051150b90b3ccb85f89e3b1d636cb88ec8'/>
<id>urn:sha1:fe2c8d051150b90b3ccb85f89e3b1d636cb88ec8</id>
<content type='text'>
Function gfs2_logd() calls the log flushing functions gfs2_ail1_start(),
gfs2_ail1_wait(), and gfs2_ail1_empty() without holding sdp-&gt;sd_log_flush_lock,
but these functions require exclusion against concurrent transactions.

To fix that, add a non-locking __gfs2_log_flush() function.  Then, in
gfs2_logd(), take sdp-&gt;sd_log_flush_lock before calling the above mentioned log
flushing functions and __gfs2_log_flush().

Fixes: 5e4c7632aae1c ("gfs2: Issue revokes more intelligently")
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: fix address space truncation during withdraw</title>
<updated>2026-04-07T20:19:59+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2026-04-03T12:42:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f4e4c4e6acdc20a9065064dd164db52e2e0d44ad'/>
<id>urn:sha1:f4e4c4e6acdc20a9065064dd164db52e2e0d44ad</id>
<content type='text'>
When a withdrawn filesystem's inodes are being evicted, the address spaces of
those inodes still need to be truncated but we can no longer start new
transactions.  We still don't want gfs2_invalidate_folio() to race with
gfs2_log_flush(), so take a read lock on sdp-&gt;sd_log_flush_lock in that case.
(It may not be obvious, but gfs2_invalidate_folio() is a jdata-only address
space operation.)

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: Remove trans_drain code duplication</title>
<updated>2026-03-23T19:55:28+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2026-03-19T14:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e34adb1cc582bbcf1d74b23f1e6d9d71fb99fa1'/>
<id>urn:sha1:9e34adb1cc582bbcf1d74b23f1e6d9d71fb99fa1</id>
<content type='text'>
Rename trans_drain() to gfs2_trans_drain().

Add a new gfs2_trans_drain_list() helper and use it in
gfs2_trans_drain() to reduce code duplication.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: Move gfs2_remove_from_journal to log.c</title>
<updated>2026-03-23T19:55:28+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2026-03-13T16:10:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10866892c79159168459289a1288df4163e94d67'/>
<id>urn:sha1:10866892c79159168459289a1288df4163e94d67</id>
<content type='text'>
Move gfs2_remove_from_journal() from meta_io.c to log.c and fix a minor
indentation glitch.

With that, gfs2_remove_from_ail() is now only used inside log.c, so it
can be made static.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: Get rid of gfs2_log_[un]lock helpers</title>
<updated>2026-03-23T19:55:28+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2026-03-20T15:43:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a15907f99e5d93b0133be608a9bbe24fd76f67a'/>
<id>urn:sha1:5a15907f99e5d93b0133be608a9bbe24fd76f67a</id>
<content type='text'>
These two helpers only hide the locking operation; they do not make
the code more readable.

Created with:

sed -i -e 's:gfs2_log_unlock(sdp):spin_unlock(\&amp;sdp-&gt;sd_log_lock):' \
       -e 's:gfs2_log_lock(sdp):spin_lock(\&amp;sdp-&gt;sd_log_lock):'

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: Initialize bio-&gt;bi_opf early</title>
<updated>2026-01-26T13:28:17+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2025-12-11T01:55:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a94f052e0982794aa65312fe8b69999e4494a20'/>
<id>urn:sha1:4a94f052e0982794aa65312fe8b69999e4494a20</id>
<content type='text'>
Pass the right blk_opf_t value to bio_alloc() so that -&gt;bi_ops is
initialized correctly and doesn't have to be changed later.  Adjust the
call chain to pass that value through to where it is needed (and only
there).

Add a separate blk_opf_t argument to gfs2_chain_bio() instead of copying
the value from the previous bio.

Fixes: 8a157e0a0aa5 ("gfs2: Fix use of bio_chain")
Reported-by: syzbot+f6539d4ce3f775aee0cc@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=f6539d4ce3f775aee0cc
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: Rename gfs2_log_submit_{bio -&gt; write}</title>
<updated>2026-01-26T13:28:17+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2025-12-11T03:24:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=59d81037d32ff1e415dcaa359c238c9ca730932d'/>
<id>urn:sha1:59d81037d32ff1e415dcaa359c238c9ca730932d</id>
<content type='text'>
Rename gfs2_log_submit_bio() to gfs2_log_submit_write(): this function
isn't used for submitting log reads.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: Kill gfs2_io_error_bh_wd</title>
<updated>2025-11-26T23:52:26+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2025-08-05T22:08:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fab27b49305c8cabe9c5bf91a66f8ca4884c1aec'/>
<id>urn:sha1:fab27b49305c8cabe9c5bf91a66f8ca4884c1aec</id>
<content type='text'>
All callers of gfs2_io_error_bh() call gfs2_withdraw() as well, so
change gfs2_io_error_bh() to call gfs2_withdraw() directly.  This also
brings it in line with other similar error reporting functions.

With that, gfs2_io_error_bh() is the same as gfs2_io_error_bh_wd(), so
remove the latter.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
</feed>
