diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-09-29 16:41:25 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-09-29 16:41:25 -0700 |
| commit | 10c0b6ba25a71d14f80586f6a795dbc47f5c6731 (patch) | |
| tree | ce4cc44816e29a71da354a399a62927346167667 /fs/xfs/xfs_export.c | |
| parent | 95289e49f0a05f729a9ff86243c9aff4f34d4041 (diff) | |
| parent | 59c71548cf1090bf42e0b0d1bc375d83d6efed3a (diff) | |
| download | linux-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_export.c')
| -rw-r--r-- | fs/xfs/xfs_export.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/fs/xfs/xfs_export.c b/fs/xfs/xfs_export.c index f71ea786a6d2..7cd09c3a82cb 100644 --- a/fs/xfs/xfs_export.c +++ b/fs/xfs/xfs_export.c @@ -146,10 +146,18 @@ xfs_nfs_get_inode( return ERR_PTR(error); } - error = xfs_inode_reload_unlinked(ip); - if (error) { - xfs_irele(ip); - return ERR_PTR(error); + /* + * 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); + xfs_irele(ip); + return ERR_PTR(error); + } } if (VFS_I(ip)->i_generation != generation) { |
