fuse: only reuse auxiliary request in fuse_writepage_in_flight()
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 16 Jan 2019 09:27:59 +0000 (10:27 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 13 Feb 2019 12:15:12 +0000 (13:15 +0100)
commit419234d5958b8ec4f5e2ba8ed2e77916f844ded1
tree5a51921ecdd67b542c8cc49653c3adb7e835596c
parent7f305ca1928d8b7db69f428b10988a3aa3e81053
fuse: only reuse auxiliary request in fuse_writepage_in_flight()

Don't reuse the queued request, even if it only contains a single page.
This is needed because previous locking changes (spliting out
fiq->waitq.lock from fc->lock) broke the assumption that request will
remain in FR_PENDING at least until the new page contents are copied.

This fix removes a slight optimization for a rare corner case, so we really
shoudln't care.

Reported-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Fixes: fd22d62ed0c3 ("fuse: no fc->lock for iqueue parts")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c