Re: [PATCH 02/12] xattr, posix acl: add listxattr helpers

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

 



On Wed, Jan 25, 2023 at 12:28:47PM +0100, Christian Brauner wrote:
> +static inline bool posix_acl_dentry_list(struct dentry *dentry)
> +{
> +	return IS_POSIXACL(d_backing_inode(dentry));
> +}

I find the open coded IS_POSIXACL much easier to read then this.
But if you want this helpers please add a comment on why it exists
and should be used.

> +static inline bool xattr_dentry_list(const struct xattr_handler *handler,
> +				     struct dentry *dentry)
> +{
> +	return handler && (!handler->list || handler->list(dentry));
> +}

This one could also benefit from a comment explaining what it does.
Also the name seems wrong, should be be something like
xattr_handler_can_list?  



[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