filemap: filemap_read() should check that the offset is positive or zero

We do check that the read offset is less than the filesystem limit,
however for good measure we should also check that it is positive or
zero, and return EINVAL if that is not the case.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Link: https://lore.kernel.org/r/482ee0b8a30b62324adb9f7c551a99926f037393.1726257832.git.trond.myklebust@hammerspace.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Trond Myklebust 2024-09-13 16:04:18 -04:00 • committed by Christian Brauner
commit 9d926f10b7
No known key found for this signature in database
GPG key ID: 91C61BC06578DCA2