Re: [PATCH 1/3] fsnotify: Use enum for return values of fsnotify_add_event()

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

 



On Fri 09-09-16 15:01:46, Miklos Szeredi wrote:
> On Thu, Sep 8, 2016 at 4:25 PM, Jan Kara <jack@xxxxxxx> wrote:
> > Currently there are three possible returns from fsnotify_add_event(). We
> > will be adding a fourth one. Let's change magic numbers to enum to make
> > things clearer.
> 
> This cleanup should go last, otherwise it'll just make backporting the
> fix harder.
> 
> Also I don't really see the value of having a big enum with 3 of the
> values having the same meaning.   Yeah, there's that BUG_ON for having
> merged a permission event.  But it checks the very obvious condition
> at the top of fanotify_merge() with the big comment, not very
> interesting.
> 
> So I'd kill the BUG_ON, drop the merged/overflowed/shutdown
> distinction and return a two way value (doing it with an enum still
> makes the code more readable, though).

Fair enough, I'll fix this up and resend the series (likely early next
week).

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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