summaryrefslogtreecommitdiffstats
path: root/lib/locking-selftest-rtmutex.h
diff options
context:
space:
mode:
authorBrian Foster2017-10-17 23:16:28 +0200
committerDarrick J. Wong2017-10-27 00:38:22 +0200
commita53efbd5c6802e07b64aa767bb932da6913470c8 (patch)
tree921df8467f362c0722b0113eb8adbb857853b961 /lib/locking-selftest-rtmutex.h
parentxfs: check kthread_should_stop() after the setting of task state (diff)
downloadkernel-qcow2-linux-a53efbd5c6802e07b64aa767bb932da6913470c8.tar.gz
kernel-qcow2-linux-a53efbd5c6802e07b64aa767bb932da6913470c8.tar.xz
kernel-qcow2-linux-a53efbd5c6802e07b64aa767bb932da6913470c8.zip
xfs: fail if xattr inactivation hits a hole
The child buffer read in xfs_attr3_node_inactive() should never reach a hole in the attr fork. If this occurs, it is likely due to a bug. Prior to commit cd87d867 ("xfs: don't crash on unexpected holes in dir/attr btrees"), this would result in a crash. Now that the crash has been fixed, this is a silent failure. Pass -1 to xfs_da3_node_read() from xfs_da3_node_inactive() to indicate that reading from a hole is an error. This logs an error to syslog and fails the inode inactivation, leaving the inode on the AG unlinked list until removed by xfs_repair (or log recovery). Also update the subsequent code to reflect that the read now returns a non-NULL buffer or an error. Signed-off-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 'lib/locking-selftest-rtmutex.h')
0 files changed, 0 insertions, 0 deletions