fs/ntfs3: Break dir enumeration if directory contents error

If we somehow attempt to read beyond the directory size, an error
is supposed to be returned.

However, in some cases, read requests do not stop and instead enter
into a loop.

To avoid this, we set the position in the directory to the end.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: stable@vger.kernel.org

+1
+1
fs/ntfs3/dir.c
··· 475 vbo = (u64)bit << index_bits; 476 if (vbo >= i_size) { 477 ntfs_inode_err(dir, "Looks like your dir is corrupt"); 478 err = -EINVAL; 479 goto out; 480 }
··· 475 vbo = (u64)bit << index_bits; 476 if (vbo >= i_size) { 477 ntfs_inode_err(dir, "Looks like your dir is corrupt"); 478 + ctx->pos = eod; 479 err = -EINVAL; 480 goto out; 481 }