VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / fs / xfs / xfs_rtalloc.c
index 524d8b2..c130d42 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -100,7 +100,9 @@ STATIC int
 xfs_lowbit32(
        __uint32_t      v)
 {
-       return ffs(v)-1;
+       if (v)
+               return ffs(v) - 1;
+       return -1;
 }
 
 /*