summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/attr.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-04-22 18:48:00 +0200
committerDarrick J. Wong <djwong@kernel.org>2024-04-23 16:47:01 +0200
commit2a009397eb5ae178670cbd7101e9635cf6412b35 (patch)
treea2779eb1c6393495721b17f6ac57b4e8402e34f2 /fs/xfs/scrub/attr.c
parentxfs: enable parent pointers (diff)
downloadlinux-2a009397eb5ae178670cbd7101e9635cf6412b35.tar.xz
linux-2a009397eb5ae178670cbd7101e9635cf6412b35.zip
xfs: revert commit 44af6c7e59b12
In my haste to fix what I thought was a performance problem in the attr scrub code, I neglected to notice that the xfs_attr_get_ilocked also had the effect of checking that attributes can actually be looked up through the attr dabtree. Fix this. Fixes: 44af6c7e59b12 ("xfs: don't load local xattr values during scrub") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub/attr.c')
-rw-r--r--fs/xfs/scrub/attr.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/xfs/scrub/attr.c b/fs/xfs/scrub/attr.c
index c07d050b39b2..393ed36709b3 100644
--- a/fs/xfs/scrub/attr.c
+++ b/fs/xfs/scrub/attr.c
@@ -209,14 +209,6 @@ xchk_xattr_actor(
}
/*
- * Local and shortform xattr values are stored in the attr leaf block,
- * so we don't need to retrieve the value from a remote block to detect
- * corruption problems.
- */
- if (value)
- return 0;
-
- /*
* Try to allocate enough memory to extract the attr value. If that
* doesn't work, return -EDEADLOCK as a signal to try again with a
* maximally sized buffer.
@@ -229,6 +221,11 @@ xchk_xattr_actor(
args.value = ab->value;
+ /*
+ * Get the attr value to ensure that lookup can find this attribute
+ * through the dabtree indexing and that remote value retrieval also
+ * works correctly.
+ */
xfs_attr_sethash(&args);
error = xfs_attr_get_ilocked(&args);
/* ENODATA means the hash lookup failed and the attr is bad */