]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Clean up minor differences between kernel and e2fsck's jbd2 source files
authorTheodore Ts'o <tytso@mit.edu>
Fri, 8 Nov 2019 20:02:42 +0000 (15:02 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 9 Nov 2019 06:55:14 +0000 (01:55 -0500)
Historically e2fsprogs's e2fsck/recovery.c and e2fsck/revoke.c was
sync'ed against the ext3 version of jbd/recovery.c and jbd/revoke.c.
Remove minor differences so we can better sync up between the two
versions.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/recovery.c
e2fsck/revoke.c

index 81110e4d445065edbfc2b0b576d0d1fec453cadb..6210249eb41b7fd9171a9d84eed52b8055e1a111 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/jbd2/recovery.c
  *
@@ -5,10 +6,6 @@
  *
  * Copyright 1999-2000 Red Hat Software --- All Rights Reserved
  *
- * This file is part of the Linux kernel and is made available under
- * the terms of the GNU General Public License, version 2, or at your
- * option, any later version, incorporated herein by reference.
- *
  * Journal recovery routines for the generic filesystem journaling code;
  * part of the ext2fs journaling system.
  */
index f72547135093525f89ee6287cad86059b220d675..d378479994051ba40809a537002ccfc937f419c0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/jbd2/revoke.c
  *
@@ -5,10 +6,6 @@
  *
  * Copyright 2000 Red Hat corp --- All Rights Reserved
  *
- * This file is part of the Linux kernel and is made available under
- * the terms of the GNU General Public License, version 2, or at your
- * option, any later version, incorporated herein by reference.
- *
  * Journal revoke routines for the generic filesystem journaling code;
  * part of the ext2fs journaling system.
  *
@@ -92,6 +89,7 @@
 #include <linux/init.h>
 #include <linux/bio.h>
 #include <linux/log2.h>
+#include <linux/hash.h>
 #endif
 
 static lkmem_cache_t *jbd2_revoke_record_cache;
@@ -130,12 +128,9 @@ static void flush_descriptor(journal_t *, struct buffer_head *, int, int);
 
 /* Utility functions to maintain the revoke table */
 
-/* Borrowed from buffer.c: this is a tried and tested block hash function */
 static inline int hash(journal_t *journal, unsigned long long block)
 {
-       struct jbd2_revoke_table_s *table = journal->j_revoke;
-
-       return (hash_64(block, table->hash_shift));
+       return hash_64(block, journal->j_revoke->hash_shift);
 }
 
 static int insert_revoke_hash(journal_t *journal, unsigned long long blocknr,
@@ -427,7 +422,7 @@ int journal_cancel_revoke(handle_t *handle, struct journal_head *jh)
        int did_revoke = 0;     /* akpm: debug */
        struct buffer_head *bh = jh2bh(jh);
 
-       jbd_debug(4, "journal_head %p, canceling revoke\n", jh);
+       jbd_debug(4, "journal_head %p, cancelling revoke\n", jh);
 
        /* Is the existing Revoke bit valid?  If so, we trust it, and
         * only perform the full cancel if the revoke bit is set.  If