Re: [PATCH v2 03/21] debugfs: get rid of dynamically allocation proxy_ops

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

 



On Sun, Jan 12, 2025 at 08:06:47AM +0000, Al Viro wrote:
> All it takes is having full_proxy_open() collect the information
> about available methods and store it in debugfs_fsdata.
> 
> Wrappers are called only after full_proxy_open() has succeeded
> calling debugfs_get_file(), so they are guaranteed to have
> ->d_fsdata already pointing to debugfs_fsdata.
> 
> As the result, they can check if method is absent and bugger off
> early, without any atomic operations, etc. - same effect as what
> we'd have from NULL method.  Which makes the entire proxy_fops
> contents unconditional, making it completely pointless - we can
> just put those methods (unconditionally) into
> debugfs_full_proxy_file_operations and forget about dynamic
> allocation, replace_fops, etc.
> 
> 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