]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
nfs/localio: remove alignment size checking in nfs_is_local_dio_possible
authorMike Snitzer <snitzer@hammerspace.com>
Wed, 26 Nov 2025 06:01:26 +0000 (01:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:37 +0000 (14:03 +0100)
[ Upstream commit f50d0328d02fe38ba196a73c143e5d87e341d4f7 ]

This check to ensure dio_offset_align isn't larger than PAGE_SIZE is
no longer relevant (older iterations of NFS Direct was allocating
misaligned head and tail pages but no longer does, so this check isn't
needed).

Fixes: c817248fc831 ("nfs/localio: add proper O_DIRECT support for READ and WRITE")
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/localio.c

index 656976b4f42ce6b419b19e10e507e5c3c0417467..512d9c5ff608a66d5ae25de52d2c00fcd6ef4135 100644 (file)
@@ -339,8 +339,6 @@ nfs_is_local_dio_possible(struct nfs_local_kiocb *iocb, int rw,
 
        if (unlikely(!nf_dio_mem_align || !nf_dio_offset_align))
                return false;
-       if (unlikely(nf_dio_offset_align > PAGE_SIZE))
-               return false;
        if (unlikely(len < nf_dio_offset_align))
                return false;