]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
exfat: fix potential wrong error return from get_block
authorSungjong Seo <sj1557.seo@samsung.com>
Wed, 26 Mar 2025 14:48:48 +0000 (23:48 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:39 +0000 (14:39 +0200)
commit37c9875c178f1503af1864aadc29c42e7cb4374a
treedd12f08be805316dadee6f52e4c9bd871a8f6810
parent49b0a6ab8e528a0c1c50e37cef9b9c7c121365f2
exfat: fix potential wrong error return from get_block

commit 59c30e31425833385e6644ad33151420e37eabe1 upstream.

If there is no error, get_block() should return 0. However, when bh_read()
returns 1, get_block() also returns 1 in the same manner.

Let's set err to 0, if there is no error from bh_read()

Fixes: 11a347fb6cef ("exfat: change to get file size from DataLength")
Cc: stable@vger.kernel.org
Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/exfat/inode.c