From 71030cf8bb67a5251ac2d5a885264cdf4e6a7fbb Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 8 Nov 2019 15:02:42 -0500 Subject: [PATCH] Clean up minor differences between kernel and e2fsck's jbd2 source files 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 --- e2fsck/recovery.c | 5 +---- e2fsck/revoke.c | 13 ++++--------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/e2fsck/recovery.c b/e2fsck/recovery.c index 81110e4..6210249 100644 --- a/e2fsck/recovery.c +++ b/e2fsck/recovery.c @@ -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. */ diff --git a/e2fsck/revoke.c b/e2fsck/revoke.c index f725471..d378479 100644 --- a/e2fsck/revoke.c +++ b/e2fsck/revoke.c @@ -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 #include #include +#include #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 -- 1.8.3.1