diff options
author | Omar Sandoval <osandov@fb.com> | 2017-08-25 19:05:26 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-09-01 19:55:30 +0200 |
commit | f2e9ad212def50bcf4c098c6288779dd97fff0f0 (patch) | |
tree | 954c96474662dac22d7901b16ab85a3882481bc8 /fs/xfs/xfs_trans.c | |
parent | xfs: evict all inodes involved with log redo item (diff) | |
download | linux-f2e9ad212def50bcf4c098c6288779dd97fff0f0.tar.xz linux-f2e9ad212def50bcf4c098c6288779dd97fff0f0.zip |
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 'fs/xfs/xfs_trans.c')
0 files changed, 0 insertions, 0 deletions