Re: [RFC][PATCH] inotify 0.10.0

Paul Jackson
2004-09-27T19:49:46Z

> unsigned long bitmask[MAX_INOTIFY_DEV_WATCHERS/BITS_PER_LONG];

This assumes that MAX_INOTIFY_DEV_WATCHERS is an integral multiple
of BITS_PER_LONG, otherwise, the last word will be missing.

Perhaps this would this better be written as:

DECLARE_BITMAP(bitmask, MAX_INOTIFY_DEV_WATCHERS);

and the clearing of it in the original patch:

> + memset(dev->bitmask, 0,
> + sizeof(unsigned long) * MAX_INOTIFY_DEV_WATCHERS / BITS_PER_LONG);

might better be written as:

CLEAR_BITMAP(dev->bitmask, MAX_INOTIFY_DEV_WATCHERS);

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373