diff options
author | Brian Foster | 2017-10-17 23:16:28 +0200 |
---|---|---|
committer | Darrick J. Wong | 2017-10-27 00:38:22 +0200 |
commit | a53efbd5c6802e07b64aa767bb932da6913470c8 (patch) | |
tree | 921df8467f362c0722b0113eb8adbb857853b961 /lib/glob.c | |
parent | xfs: check kthread_should_stop() after the setting of task state (diff) | |
download | kernel-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/glob.c')
0 files changed, 0 insertions, 0 deletions