fs/ntfs3: Break dir enumeration if directory contents error
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 23 Apr 2024 14:21:58 +0000 (17:21 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Fri, 24 May 2024 09:50:12 +0000 (12:50 +0300)
commit302e9dca8428979c9c99f2dbb44dc1783f5011c3
tree1719b1852705651c5b0b7af3473d9d502827bccf
parent05afeeebcac850a016ec4fb1f681ceda11963562
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
fs/ntfs3/dir.c