On Fri 15-11-24 10:30:14, Josef Bacik wrote: > From: Al Viro <viro@xxxxxxxxxxxxxxxxxx> > > All it takes to get rid of the __FMODE_NONOTIFY kludge is switching > fanotify from anon_inode_getfd() to anon_inode_getfile_fmode() and adding > a dentry_open_fmode() helper to be used by fanotify on the other path. ^^^ this ended up being dentry_open_nonotify() > That's it - no more weird shit in OPEN_FMODE(), etc. > > Suggested-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> > Link: https://lore.kernel.org/linux-fsdevel/20241113043003.GH3387508@ZenIV/ > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> ... > @@ -3706,11 +3708,9 @@ struct ctl_table; > int __init list_bdev_fs_names(char *buf, size_t size); > > #define __FMODE_EXEC ((__force int) FMODE_EXEC) > -#define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY) > > #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) > -#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ > - (flag & __FMODE_NONOTIFY))) > +#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE))) ^^^ one more level of braces than necessary now Otherwise looks good to me. Don't need to resend just because of this, I can fix this up if there's nothing else. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR