patch-2.4.27 linux-2.4.27/fs/xfs/xfs_rtalloc.c

Next file: linux-2.4.27/fs/xfs/xfs_sb.h
Previous file: linux-2.4.27/fs/xfs/xfs_mount.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/fs/xfs/xfs_rtalloc.c linux-2.4.27/fs/xfs/xfs_rtalloc.c
@@ -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 @@
 xfs_lowbit32(
 	__uint32_t	v)
 {
-	return ffs(v)-1;
+	if (v)
+		return ffs(v) - 1;
+	return -1;
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)