Re: [RFC][PATCH] inotify 0.10.0
From: Paul Jackson
Date: Mon Sep 27 2004 - 14:51:01 EST
> 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@xxxxxxx> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/