On 12/1/21 10:24 AM, Joseph Qi wrote:
On 11/30/21 6:40 PM, Dan Carpenter wrote:
quoted
The callers assume that "*fsdata" is set on the success path, but
that's not necessarily true on this path.
In ocfs2_page_mkwrite(), since in this case no target page locked, it
will finally return VM_FAULT_NOPAGE (better VM_FAULT_RETRY?) and throw
to handle_mm_fault(). So no problem as comments described.
But things seems changed since append direct io path started to use
write_[begin/end]. In this path, the target page is expected as NULL.
This needs more discussion.
ocfs2_grab_pages_for_write() returns EAGAIN only in case of mmap. So
current code won't have any issue.
I'll send a cleanup to make the code more clearly.
Thanks,
Joseph