]> err.no Git - linux-2.6/commitdiff
[PATCH] ieee1394: nodemgr: do not peek into struct semaphore
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 25 Jun 2006 12:46:44 +0000 (05:46 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 25 Jun 2006 17:00:54 +0000 (10:00 -0700)
Also revert patch "frv: ieee1394 is borken on frv", as it no longer is.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Jody McIntyre <scjody@modernduck.com>
Cc: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/ieee1394/Kconfig
drivers/ieee1394/nodemgr.c

index 79b81be67975050ab6f893aa147ae808abe45b22..186737539cf5f4fe32fac373fe982724bd5ac7ec 100644 (file)
@@ -4,7 +4,7 @@ menu "IEEE 1394 (FireWire) support"
 
 config IEEE1394
        tristate "IEEE 1394 (FireWire) support"
-       depends on (PCI || BROKEN) && (BROKEN || !FRV)
+       depends on PCI || BROKEN
        select NET
        help
          IEEE 1394 describes a high performance serial bus, which is also
index 948f1b8c42388152ff8d6f9d8445e75bcb957281..50c71e17de73701e4dbb175f4a99f527bc64dce6 100644 (file)
@@ -8,6 +8,7 @@
  * directory of the kernel sources for details.
  */
 
+#include <linux/bitmap.h>
 #include <linux/kernel.h>
 #include <linux/config.h>
 #include <linux/list.h>
@@ -334,10 +335,12 @@ static ssize_t fw_show_ne_bus_options(struct device *dev, struct device_attribut
 static DEVICE_ATTR(bus_options,S_IRUGO,fw_show_ne_bus_options,NULL);
 
 
+/* tlabels_free, tlabels_allocations, tlabels_mask are read non-atomically
+ * here, therefore displayed values may be occasionally wrong. */
 static ssize_t fw_show_ne_tlabels_free(struct device *dev, struct device_attribute *attr, char *buf)
 {
        struct node_entry *ne = container_of(dev, struct node_entry, device);
-       return sprintf(buf, "%d\n", atomic_read(&ne->tpool->count.count) + 1);
+       return sprintf(buf, "%d\n", 64 - bitmap_weight(ne->tpool->pool, 64));
 }
 static DEVICE_ATTR(tlabels_free,S_IRUGO,fw_show_ne_tlabels_free,NULL);