Re: [PATCH v2 04/21] debugfs: don't mess with bits in ->d_fsdata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 12, 2025 at 08:06:48AM +0000, Al Viro wrote:
> The reason we need that crap is the dual use ->d_fsdata has there -
> it's both holding a debugfs_fsdata reference after the first
> debugfs_file_get() (actually, after the call of proxy ->open())
> *and* it serves as a place to stash a reference to real file_operations
> from object creation to the first open.  Oh, and it's triple use,
> actually - that stashed reference might be to debugfs_short_fops.
> 
> Bugger that for a game of solidiers - just put the operations

The most confusing part of this patch is this sentence. :)
"game of solidiers"?

> reference into debugfs-private augmentation of inode.  And split
> debugfs_full_file_operations into full and short cases, so that
> debugfs_get_file() could tell one from another.
> 
> Voila - ->d_fsdata holds NULL until the first (successful) debugfs_get_file()
> and a reference to struct debugfs_fsdata afterwards.
> 
> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux