diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-08-19 04:08:25 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-09-01 20:55:30 +0300 |
commit | 799ea9e9c59949008770aab4e1da87f10e99dbe4 (patch) | |
tree | a61a76330a6c6a1a45139df2afa9d2b4b2aee6fa /fs/inode.c | |
parent | 2d32311cf19bfb8c1d2b4601974ddd951f9cfd0b (diff) | |
download | linux-799ea9e9c59949008770aab4e1da87f10e99dbe4.tar.xz |
xfs: evict all inodes involved with log redo item
When we introduced the bmap redo log items, we set MS_ACTIVE on the
mountpoint and XFS_IRECOVERY on the inode to prevent unlinked inodes
from being truncated prematurely during log recovery. This also had the
effect of putting linked inodes on the lru instead of evicting them.
Unfortunately, we neglected to find all those unreferenced lru inodes
and evict them after finishing log recovery, which means that we leak
them if anything goes wrong in the rest of xfs_mountfs, because the lru
is only cleaned out on unmount.
Therefore, evict unreferenced inodes in the lru list immediately
after clearing MS_ACTIVE.
Fixes: 17c12bcd30 ("xfs: when replaying bmap operations, don't let unlinked inodes get reaped")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Cc: viro@ZenIV.linux.org.uk
Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/inode.c b/fs/inode.c index 50370599e371..6a1626e0edaf 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -637,6 +637,7 @@ again: dispose_list(&dispose); } +EXPORT_SYMBOL_GPL(evict_inodes); /** * invalidate_inodes - attempt to free all inodes on a superblock |