diff options
author | Omar Sandoval <osandov@fb.com> | 2017-08-25 20:05:26 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-09-01 20:55:30 +0300 |
commit | f2e9ad212def50bcf4c098c6288779dd97fff0f0 (patch) | |
tree | 954c96474662dac22d7901b16ab85a3882481bc8 /Documentation/cpuidle | |
parent | 799ea9e9c59949008770aab4e1da87f10e99dbe4 (diff) | |
download | linux-f2e9ad212def50bcf4c098c6288779dd97fff0f0.tar.xz |
xfs: check for race with xfs_reclaim_inode() in xfs_ifree_cluster()
After xfs_ifree_cluster() finds an inode in the radix tree and verifies
that the inode number is what it expected, xfs_reclaim_inode() can swoop
in and free it. xfs_ifree_cluster() will then happily continue working
on the freed inode. Most importantly, it will mark the inode stale,
which will probably be overwritten when the inode slab object is
reallocated, but if it has already been reallocated then we can end up
with an inode spuriously marked stale.
In 8a17d7ddedb4 ("xfs: mark reclaimed inodes invalid earlier") we added
a second check to xfs_iflush_cluster() to detect this race, but the
similar RCU lookup in xfs_ifree_cluster() needs the same treatment.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'Documentation/cpuidle')
0 files changed, 0 insertions, 0 deletions