diff options
| author | Brian Foster <[email protected]> | 2016-02-08 04:00:02 +0000 |
|---|---|---|
| committer | Dave Chinner <[email protected]> | 2016-02-08 04:00:02 +0000 |
| commit | af055e37a91d215d7174d0b84c86795ca81086a7 (patch) | |
| tree | 3f2c623a658b1f72fbf7d53f58e7c7cf277f0271 /fs/xfs/libxfs/xfs_inode_buf.h | |
| parent | xfs: clean up unwritten buffers on write failure (diff) | |
| download | kernel-af055e37a91d215d7174d0b84c86795ca81086a7.tar.gz kernel-af055e37a91d215d7174d0b84c86795ca81086a7.zip | |
xfs: fix xfs_log_ticket leak in xfs_end_io() after fs shutdown
If the filesystem has shut down, xfs_end_io() currently sets an
error on the ioend and proceeds to ioend destruction. The ioend
might contain a truncate transaction if the I/O extended the size of
the file. This transaction is only cleaned up in
xfs_setfilesize_ioend(), however, which is skipped in this case.
This results in an xfs_log_ticket leak message when the associate
cache slab is destroyed (e.g., on rmmod).
This was originally reproduced by xfs/141 on a distro kernel. The
problem is reproducible on an upstream kernel, but not easily
detected in current upstream if the xfs_log_ticket cache happens to
be merged with another cache. This can be reproduced more
deterministically with the 'slab_nomerge' kernel boot option.
Update xfs_end_io() to proceed with normal end I/O processing after
an error is set on an ioend due to fs shutdown. The I/O type-based
processing is already designed to handle an I/O error and ensure
that the ioend is cleaned up correctly.
Signed-off-by: Brian Foster <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_buf.h')
0 files changed, 0 insertions, 0 deletions
