summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_buf.h
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2017-10-18 00:16:28 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2017-10-27 01:38:22 +0300
commita53efbd5c6802e07b64aa767bb932da6913470c8 (patch)
tree921df8467f362c0722b0113eb8adbb857853b961 /fs/xfs/xfs_buf.h
parent0bd89676c4fed53b003025bc4a5200861ac5d8ef (diff)
downloadlinux-a53efbd5c6802e07b64aa767bb932da6913470c8.tar.xz
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 'fs/xfs/xfs_buf.h')
0 files changed, 0 insertions, 0 deletions