cachefiles: Fix __cachefiles_prepare_write()
authorDavid Howells <dhowells@redhat.com>
Tue, 2 Jan 2024 16:28:04 +0000 (16:28 +0000)
committerDavid Howells <dhowells@redhat.com>
Wed, 3 Jan 2024 14:52:53 +0000 (14:52 +0000)
commit7097c96411d22a1b3f6370dfd7eb2e3b7b83ff98
tree71487edab7c0bb7bf522bbac7b6df7ab94d5bded
parent80105ed2fd2715fb09a8fdb0655a8bdc86c120db
cachefiles: Fix __cachefiles_prepare_write()

Fix __cachefiles_prepare_write() to correctly determine whether the
requested write will fit correctly with the DIO alignment.

Reported-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Yiqun Leng <yqleng@linux.alibaba.com>
Tested-by: Jia Zhu <zhujia.zj@bytedance.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-erofs@lists.ozlabs.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
fs/cachefiles/io.c