Re: [patchlet] Minor cleanup in mm/swapfile.c (2.4.0t8)

From: Juan J. Quintela (quintela@fi.udc.es)
Date: Wed Sep 13 2000 - 15:54:05 EST


>>>>> "rasmus" == Rasmus Andersen <rasmus@jaquet.dk> writes:

rasmus> Hi.
rasmus> This patch does minor and strightforward cleanup in mm/swapfile.c.

Please, don't apply, SWP_WRITEOK is defined as two bits:

#define SWP_WRITEOK 3

that means that
((p->flags & SWP_WRITEOK) == SWP_WRITEOK) != (p->flags & SWP_WRITEOK)

rasmus> while (1) {
rasmus> p = &swap_info[type];
rasmus> - if ((p->flags & SWP_WRITEOK) == SWP_WRITEOK) {
rasmus> + if (p->flags & SWP_WRITEOK) {
rasmus> swap_device_lock(p);
rasmus> offset = scan_swap_map(p, count);
rasmus> swap_device_unlock(p);

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:22 EST