Convert XFS to use sem_getcount instead of nasty hack. Fixes warning
with XFS debugging on parisc (untested since I can't find an obvious way
to enable XFS debugging) as well as the valusema macro, used in two places
in XFS.
Tested on i386, ia64, parisc.
Signed-off-by: Jody McIntyre <[EMAIL PROTECTED]>
Index: 1394-dev/fs/xfs/linux-2.6/xfs_buf.c
===================================================================
--- 1394-dev.orig/fs/xfs/linux-2.6/xfs_buf.c 2005-03-15 17:45:47.000000000
-0500
+++ 1394-dev/fs/xfs/linux-2.6/xfs_buf.c 2005-03-15 17:52:39.000000000 -0500
@@ -976,7 +976,7 @@ int
pagebuf_lock_value(
xfs_buf_t *pb)
{
- return(atomic_read(&pb->pb_sema.count));
+ return(sem_getcount(&pb->pb_sema));
}
#endif
Index: 1394-dev/fs/xfs/linux-2.6/sema.h
===================================================================
--- 1394-dev.orig/fs/xfs/linux-2.6/sema.h 2005-03-15 17:59:50.000000000
-0500
+++ 1394-dev/fs/xfs/linux-2.6/sema.h 2005-03-15 18:16:00.000000000 -0500
@@ -48,7 +48,7 @@ typedef struct semaphore sema_t;
#define initnsema(sp, val, name) sema_init(sp, val)
#define psema(sp, b) down(sp)
#define vsema(sp) up(sp)
-#define valusema(sp) (atomic_read(&(sp)->count))
+#define valusema(sp) (sem_getcount(sp))
#define freesema(sema)
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/