]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: tracepoints: get correct superblock from dentry in event btrfs_sync_file()
authorGoldwyn Rodrigues <rgoldwyn@suse.de>
Fri, 13 Mar 2026 18:11:39 +0000 (14:11 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2026 19:11:12 +0000 (20:11 +0100)
commita85b46db143fda5869e7d8df8f258ccef5fa1719
tree9e874461f09093f21d1ef2a18f6b84b637999453
parent0dcabcb920a5c143c568f37c26c6f2b4b9206bd1
btrfs: tracepoints: get correct superblock from dentry in event btrfs_sync_file()

If overlay is used on top of btrfs, dentry->d_sb translates to overlay's
super block and fsid assignment will lead to a crash.

Use file_inode(file)->i_sb to always get btrfs_sb.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
include/trace/events/btrfs.h