summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_qm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-09-29 16:41:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-09-29 16:41:25 -0700
commit10c0b6ba25a71d14f80586f6a795dbc47f5c6731 (patch)
treece4cc44816e29a71da354a399a62927346167667 /fs/xfs/xfs_qm.c
parent95289e49f0a05f729a9ff86243c9aff4f34d4041 (diff)
parent59c71548cf1090bf42e0b0d1bc375d83d6efed3a (diff)
downloadlinux-10c0b6ba25a71d14f80586f6a795dbc47f5c6731.tar.gz
linux-10c0b6ba25a71d14f80586f6a795dbc47f5c6731.tar.bz2
linux-10c0b6ba25a71d14f80586f6a795dbc47f5c6731.zip
Merge tag 'xfs-6.6-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs fix from Chandan Babu: - fix for commit 68b957f64fca ("xfs: load uncached unlinked inodes into memory on demand") which address review comments provided by Dave Chinner * tag 'xfs-6.6-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix reloading entire unlinked bucket lists
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r--fs/xfs/xfs_qm.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 7256090c3895..086e78a6143a 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -1160,9 +1160,18 @@ xfs_qm_dqusage_adjust(
if (error)
return error;
- error = xfs_inode_reload_unlinked(ip);
- if (error)
- goto error0;
+ /*
+ * Reload the incore unlinked list to avoid failure in inodegc.
+ * Use an unlocked check here because unrecovered unlinked inodes
+ * should be somewhat rare.
+ */
+ if (xfs_inode_unlinked_incomplete(ip)) {
+ error = xfs_inode_reload_unlinked(ip);
+ if (error) {
+ xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
+ goto error0;
+ }
+ }
ASSERT(ip->i_delayed_blks == 0);