]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: return an error when an inline directory is too small
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 3 Oct 2016 16:11:15 +0000 (09:11 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 3 Oct 2016 16:11:15 +0000 (09:11 -0700)
commit15e2a969d22a6a06f4dd1790b97af3872bb43f9c
tree9995f2fb2595fbf2bf4f2d5e1387a8edb8b4603c
parentf3092467fbc1f6c49d36f7130ed6b16f596450a4
xfs: return an error when an inline directory is too small

If the size of an inline directory is so small that it doesn't
even cover the required header size, return an error to userspace
instead of ASSERTing and returning 0 like everything's ok.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: Jan Kara <jack@suse.cz>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_dir2_readdir.c