fix max_write update in do_init() (#926)
authorlegezywzh <94814730+legezywzh@users.noreply.github.com>
Tue, 16 Apr 2024 15:23:57 +0000 (23:23 +0800)
committerGitHub <noreply@github.com>
Tue, 16 Apr 2024 15:23:57 +0000 (17:23 +0200)
commit080077369e7fa740da7d9813e6766c308e4e555c
tree5dabf1f28a8ae1b8a6d4a9c070e1d80d3736bf94
parent20de66dc898002b9315192a5095a3dcd4f6ec248
fix max_write update in do_init() (#926)

If user updates conn->max_write in fuse_lowlevel_ops' init() method, do_init()
will miss the "conn.max_write > bufsize - FUSE_BUFFER_HEADER_SIZE" judgment,
and ->init method will be called after it, which obviously is a bug.

Signed-off-by: Xiaoguang Wang <lege.wang@jaguarmicro.com>
Co-authored-by: Xiaoguang Wang <lege.wang@jaguarmicro.com>
lib/fuse_lowlevel.c