[Devel] [PATCH RHEL7 COMMIT] fuse kio: Use __maybe_unused
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Oct 16 18:04:32 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-862.14.4.vz7.72.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.14.4.vz7.72.9
------>
commit b7f9b4aaa9c9828f40c79d496cfe4dc3e9c04db4
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Tue Oct 16 18:04:29 2018 +0300
fuse kio: Use __maybe_unused
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
Reviewed-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
=====================
Patchset description:
Order pcs_rpc and pcs_sockio destruction and close leaked socket
https://pmc.acronis.com/browse/VSTOR-15305
Ploop can asynchronously unmap regions by sending IOCB_CMD_UNMAP_ITER, but this
command isn't quite correctly interpreted in Fuse. Moreover, in Fast-path mode,
fallocate(FALLOC_FL_PUNCH_HOLE|FALLOC_FL_ZERO_RANGE) falls to fuse user daemon
and it can lead to data corruption.
Let's fix it.
Kirill Tkhai (9):
fuse kio: Use __maybe_unused
fuse kio: Use sio eof instead of parent to determ abort
fuse kio: Reorder callback assignment
fuse kio: Add pcs_cleanup_wq
fuse kio: Destroy rpc in work func
fuse kio: Introduce pcs_sk_kick_queue()
fuse kio: Dereference sk_user_data under rcu
fuse kio: Fix rpc socket leak on rpc_abort()
fuse kio: Hold pcs_rpc counter till sio may be freed
---
fs/fuse/kio/pcs/pcs_sock_io.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_sock_io.c b/fs/fuse/kio/pcs/pcs_sock_io.c
index 0cf392fb4703..18b66f99e018 100644
--- a/fs/fuse/kio/pcs/pcs_sock_io.c
+++ b/fs/fuse/kio/pcs/pcs_sock_io.c
@@ -212,7 +212,6 @@ static void pcs_sockio_recv(struct pcs_sockio *sio)
u32 msg_size;
unsigned long loop_timeout = jiffies + PCS_SIO_SLICE;
- (void)ep;
TRACE("ENTER:" PEER_FMT " sio:%p cur_msg:%p\n", PEER_ARGS(ep), sio, sio->current_msg);
while(!test_bit(PCS_IOCONN_BF_DEAD, &conn->flags)) {
@@ -316,14 +315,13 @@ static void pcs_sockio_recv(struct pcs_sockio *sio)
static void pcs_sockio_send(struct pcs_sockio *sio)
{
+ struct pcs_rpc *ep __maybe_unused = sio->parent;
struct pcs_ioconn* conn = &sio->ioconn;
struct iov_iter *it = &sio->write_iter;
unsigned long loop_timeout = jiffies + PCS_SIO_SLICE;
struct pcs_msg * msg;
int done = 0;
int count = 0;
- struct pcs_rpc *ep = sio->parent;
- (void)ep;
while (!list_empty(&sio->write_queue)) {
msg = list_first_entry(&sio->write_queue, struct pcs_msg, list);
More information about the Devel
mailing list