Re: [PATCH v3 05/16] fsnotify: pass flags argument to fsnotify_alloc_group()

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

 



On Wed 13-04-22 12:09:24, Amir Goldstein wrote:
> Add flags argument to fsnotify_alloc_group(), define and use the flag
> FSNOTIFY_GROUP_USER in inotify and fanotify instead of the helper
> fsnotify_alloc_user_group() to indicate user allocation.
> 
> Although the flag FSNOTIFY_GROUP_USER is currently not used after group
> allocation, we store the flags argument in the group struct for future
> use of other group flags.
> 
> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>

Looks good, just one nit:

> diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
> index 2ff686882303..2057ae4bf8e9 100644
> --- a/include/linux/fsnotify_backend.h
> +++ b/include/linux/fsnotify_backend.h
> @@ -210,6 +210,11 @@ struct fsnotify_group {
>  	unsigned int priority;
>  	bool shutdown;		/* group is being shut down, don't queue more events */
>  
> +#define FSNOTIFY_GROUP_USER	0x01 /* user allocated group */
> +#define FSNOTIFY_GROUP_FLAG(group, flag) \

Is the FSNOTIFY_GROUP_FLAG() macro that useful? It isn't shorter than
"group->flags & FSNOTIFY_GROUP_xxx" and it only obfuscates things.

								Honza

-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[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