]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gfs2: Call unlock_new_inode before d_instantiate
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 23 Feb 2026 11:04:05 +0000 (12:04 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 23 Feb 2026 11:31:12 +0000 (12:31 +0100)
commit2ff7cf7e0640ff071ebc5c7e3dc2df024a7c91e6
tree93316e236a9c41c6fbb9dce771d3ca7cc07ac6e9
parent7141433fbed290f4dd42008d3102db2363275035
gfs2: Call unlock_new_inode before d_instantiate

As Neil Brown describes in detail in the link referenced below, new
inodes must be unlocked before they can be instantiated.

An even better fix is to use d_instantiate_new(), which combines
d_instantiate() and unlock_new_inode().

Fixes: 3d36e57ff768 ("gfs2: gfs2_create_inode rework")
Reported-by: syzbot+0ea5108a1f5fb4fcc2d8@syzkaller.appspotmail.com
Link: https://lore.kernel.org/linux-fsdevel/177153754005.8396.8777398743501764194@noble.neil.brown.name/
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/inode.c