diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-04-12 07:26:24 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-20 13:07:38 +0300 |
commit | 8795936437177cf3c88bc5b40334799c0da71b48 (patch) | |
tree | 162207b36253b86280b0065333a430be45316d7f /fs/ocfs2/dlm/dlmfs.c | |
parent | c76dd368759a2a26cbbe18cbe853fb68f94df363 (diff) | |
download | linux-8795936437177cf3c88bc5b40334799c0da71b48.tar.xz |
xfs: force log and push AIL to clear pinned inodes when aborting mount
commit d336f7ebc65007f5831e2297e6f3383ae8dbf8ed upstream.
[ Slightly modify fs/xfs/xfs_mount.c to resolve merge conflicts ]
If we allocate quota inodes in the process of mounting a filesystem but
then decide to abort the mount, it's possible that the quota inodes are
sitting around pinned by the log. Now that inode reclaim relies on the
AIL to flush inodes, we have to force the log and push the AIL in
between releasing the quota inodes and kicking off reclaim to tear down
all the incore inodes. Do this by extracting the bits we need from the
unmount path and reusing them. As an added bonus, failed writes during
a failed mount will not retry forever now.
This was originally found during a fuzz test of metadata directories
(xfs/1546), but the actual symptom was that reclaim hung up on the quota
inodes.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ocfs2/dlm/dlmfs.c')
0 files changed, 0 insertions, 0 deletions