Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / fs / xfs / xfs_trans_ail.c
index 7f2037a..558c87f 100644 (file)
@@ -1,43 +1,27 @@
 /*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2002,2005 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
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
  * published by the Free Software Foundation.
  *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like.  Any license provided herein, whether implied or
- * otherwise, applies only to this software file.  Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA  94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
-
 #include "xfs.h"
-#include "xfs_macros.h"
+#include "xfs_fs.h"
 #include "xfs_types.h"
-#include "xfs_inum.h"
 #include "xfs_log.h"
+#include "xfs_inum.h"
 #include "xfs_trans.h"
 #include "xfs_sb.h"
-#include "xfs_dir.h"
 #include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_trans_priv.h"
@@ -48,11 +32,11 @@ STATIC xfs_log_item_t * xfs_ail_delete(xfs_ail_entry_t *, xfs_log_item_t *);
 STATIC xfs_log_item_t * xfs_ail_min(xfs_ail_entry_t *);
 STATIC xfs_log_item_t * xfs_ail_next(xfs_ail_entry_t *, xfs_log_item_t *);
 
-#ifdef XFSDEBUG
+#ifdef DEBUG
 STATIC void xfs_ail_check(xfs_ail_entry_t *);
 #else
 #define        xfs_ail_check(a)
-#endif /* XFSDEBUG */
+#endif /* DEBUG */
 
 
 /*
@@ -378,9 +362,10 @@ xfs_trans_delete_ail(
                        AIL_UNLOCK(mp, s);
                else {
                        xfs_cmn_err(XFS_PTAG_AILDELETE, CE_ALERT, mp,
-                               "xfs_trans_delete_ail: attempting to delete a log item that is not in the AIL");
-                       xfs_force_shutdown(mp, XFS_CORRUPT_INCORE);
+               "%s: attempting to delete a log item that is not in the AIL",
+                                       __FUNCTION__);
                        AIL_UNLOCK(mp, s);
+                       xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
                }
        }
 }
@@ -553,7 +538,7 @@ xfs_ail_next(
 
 }
 
-#ifdef XFSDEBUG
+#ifdef DEBUG
 /*
  * Check that the list is sorted as it should be.
  */
@@ -593,4 +578,4 @@ xfs_ail_check(
        ASSERT(lip == (xfs_log_item_t*)base);
        ASSERT(base->ail_back == prev_lip);
 }
-#endif /* XFSDEBUG */
+#endif /* DEBUG */