diff options
author | Akinobu Mita <mita@miraclelinux.com> | 2006-03-26 04:39:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:10 -0500 |
commit | 67b0ad574b5ee90f8ea58196ff8a7f3780b75365 (patch) | |
tree | ca9bc212f6efa8f5170185ef1fa21f75de0684fd /include/asm-m68k/bitops.h | |
parent | 72b61a3cfd80d1321eb898be8ceae2064f0fbea1 (diff) |
[PATCH] bitops: use non atomic operations for minix_*_bit() and ext2_*_bit()
Bitmap functions for the minix filesystem and the ext2 filesystem except
ext2_set_bit_atomic() and ext2_clear_bit_atomic() do not require the atomic
guarantees.
But these are defined by using atomic bit operations on several architectures.
(cris, frv, h8300, ia64, m32r, m68k, m68knommu, mips, s390, sh, sh64, sparc,
sparc64, v850, and xtensa)
This patch switches to non atomic bit operation.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-m68k/bitops.h')
-rw-r--r-- | include/asm-m68k/bitops.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h index 13f4c0048463..b7955b39d963 100644 --- a/include/asm-m68k/bitops.h +++ b/include/asm-m68k/bitops.h | |||
@@ -365,9 +365,9 @@ static inline int minix_find_first_zero_bit(const void *vaddr, unsigned size) | |||
365 | return ((p - addr) << 4) + (res ^ 31); | 365 | return ((p - addr) << 4) + (res ^ 31); |
366 | } | 366 | } |
367 | 367 | ||
368 | #define minix_test_and_set_bit(nr, addr) test_and_set_bit((nr) ^ 16, (unsigned long *)(addr)) | 368 | #define minix_test_and_set_bit(nr, addr) __test_and_set_bit((nr) ^ 16, (unsigned long *)(addr)) |
369 | #define minix_set_bit(nr,addr) set_bit((nr) ^ 16, (unsigned long *)(addr)) | 369 | #define minix_set_bit(nr,addr) __set_bit((nr) ^ 16, (unsigned long *)(addr)) |
370 | #define minix_test_and_clear_bit(nr, addr) test_and_clear_bit((nr) ^ 16, (unsigned long *)(addr)) | 370 | #define minix_test_and_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 16, (unsigned long *)(addr)) |
371 | 371 | ||
372 | static inline int minix_test_bit(int nr, const void *vaddr) | 372 | static inline int minix_test_bit(int nr, const void *vaddr) |
373 | { | 373 | { |
@@ -377,9 +377,9 @@ static inline int minix_test_bit(int nr, const void *vaddr) | |||
377 | 377 | ||
378 | /* Bitmap functions for the ext2 filesystem. */ | 378 | /* Bitmap functions for the ext2 filesystem. */ |
379 | 379 | ||
380 | #define ext2_set_bit(nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) | 380 | #define ext2_set_bit(nr, addr) __test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) |
381 | #define ext2_set_bit_atomic(lock, nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) | 381 | #define ext2_set_bit_atomic(lock, nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) |
382 | #define ext2_clear_bit(nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) | 382 | #define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) |
383 | #define ext2_clear_bit_atomic(lock, nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) | 383 | #define ext2_clear_bit_atomic(lock, nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) |
384 | 384 | ||
385 | static inline int ext2_test_bit(int nr, const void *vaddr) | 385 | static inline int ext2_test_bit(int nr, const void *vaddr) |