summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorRavi Singh <ravising@redhat.com>2026-10-21 08:33:29 +0200
committerCarlos Maiolino <cem@kernel.org>2026-11-02 12:04:34 +0100
commitbde0010631a207511308dc8407f34595dac13ad5 (patch)
tree406f181083496b1bc55b625436b117b1327c6e74 /include/linux/timerqueue.h
parent0344a9492efac4c79202a07cf284a382f7054170 (diff)
xfs: mark i_mode=0 and shut down on attr fork inactivation failure
xfs_attr_inactive() can fail on an I/O error reading the attribute fork's btree blocks, for example from fault injection such as the dm-flakey errors used by xfstests generic/475. On failure, xfs_ifork_zap_attr() zeros af_nextents without freeing the attribute blocks or decrementing i_nblocks, leaving the inode in an inconsistent in-memory state. The inode is marked XFS_IRECLAIMABLE and remains in the cache. If a concurrent operation (e.g., XFS_IOC_FSBULKSTAT) calls xfs_iget() on this inode, xfs_iget_check_free_state() will allow recycling if i_mode != 0. The recycled inode reuses the stale in-memory state (af_nextents=0, i_nblocks=1). When the recycled inode is queued for inactivation again, xfs_attr_inactive() sees af_nextents=0 and skips truncation, leaving i_nblocks non-zero. This triggers the assertion in xfs_ifree(): XFS: Assertion failed: ip->i_nblocks == 0 Clear i_mode so the stale inode cannot be recycled, and force a shutdown so log recovery frees the still-unlinked inode on the next mount. Suggested-by: Dave Chinner <dgc@kernel.org> Signed-off-by: Ravi Singh <ravising@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions