Thread (3 messages) 3 messages, 2 authors, 2021-12-06

Re: [PATCH] ocfs2: fix uninitialized variable in ocfs2_dio_wr_get_block()

From: Joseph Qi <joseph.qi@linux.alibaba.com>
Date: 2021-12-06 06:03:19
Also in: lkml, ocfs2-devel


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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help