blob: f0376c39c9441516e8ad876ade9b6cbdac90ecca [file] [log] [blame]
From 1df9b8b1f3cc6902d8467c6e4670a27bfd282f34 Mon Sep 17 00:00:00 2001
From: Jan Kara <>
Date: Tue, 17 Mar 2020 12:40:02 +0100
Subject: [PATCH] ext2: fix debug reference to ext2_xattr_cache
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 32302085a8d90859c40cf1a5e8313f575d06ec75 upstream.
Fix a debug-only build error in ext2/xattr.c:
When building without extra debugging, (and with another patch that uses
no_printk() instead of <empty> for the ext2-xattr debug-print macros,
this build error happens:
../fs/ext2/xattr.c: In function ext2_xattr_cache_insert’:
../fs/ext2/xattr.c:869:18: error: ext2_xattr_cache undeclared (first use in
this function); did you mean ext2_xattr_list’?
Fix the problem by removing cached entry count from the debug message
since otherwise we'd have to export the mbcache structure just for that.
Fixes: be0726d33cb8 ("ext2: convert to mbcache2")
Reported-by: Randy Dunlap <>
Signed-off-by: Jan Kara <>
Signed-off-by: Paul Gortmaker <>
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
index 6aff06397ad5..4dc725d8b0c7 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
@@ -841,8 +841,7 @@ ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh)
if (error) {
if (error == -EBUSY) {
- ea_bdebug(bh, "already in cache (%d cache entries)",
- atomic_read(&ext2_xattr_cache->c_entry_count));
+ ea_bdebug(bh, "already in cache");
error = 0;
} else