lkml.org 
[lkml]   [2004]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] inotify 0.10.0
> 	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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.086 / U:2.520 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site