Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1462325ybe; Thu, 5 Sep 2019 16:08:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYhAe2aqOt6y9T0WWwc2U7l40fA6MK0LzIgi8FpSOT/20ig/I9JM012i1m6eMZhljziire X-Received: by 2002:a17:902:166:: with SMTP id 93mr6354856plb.320.1567724887110; Thu, 05 Sep 2019 16:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567724887; cv=none; d=google.com; s=arc-20160816; b=l76dbV4yVq5D0VES5huBVSADOcYPTAVO1RDKa4zy6Nys6+jToY8cKkbGQI6iWF7jML i/JLdUJ/iG2CwWTA2O8++QS8OD/Ur7M+g9qhzrJVSqvTWMcKnwtog/A0+qDYf2SDnyiA +QfStqeVEV0civR7t3lITF7JMBQD4MKFsCMUsvoCYlmInbdTtVdH5uI1hQNg/QHIuo74 x/NAIczJ1EXcOwxIuCrB6MfZ6vZbyCo75ShKZD6pzF/U/rEx3sd6PV5tUsslLlh0wgzM TiQP46Kybuj002ff+HDSSzQKlhrj0fYSwoYGe7wAfY2m7DHY7AJF3yx/qnwrmlhTxc14 dYaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=aiIuTqkBuur2noAOoN6THsT+g0CTJm9pyNa7f8P6d50=; b=gR4QFbEuOEvrjH8oFtu0EWtOMNpu3GxT7UIWDwj9DgqCqxi4ttFk5D3GQH/Kve6khW T9tfA9Orggzs7C0lvE705NldPKrpR7+MpIJYlNIhmlFOTSM4akkHYDvEQ6Pq0M1MSzz3 9oafQz9voW14jMHW1zYr+lK5Nl1CNXyOHgdMsxfYlfUfnG51voM8KaTwsPJElJ/Fk0uS IPNzECd9sw5BbgfWnocIkEyyuwiFGUX+FWPllJUp3dVxTSUlFFVQIm0Uo/cg2TYfWUWI kMHmHNjh9zQgbQFxfK1mH/35xBvNZxEtyea7QFSz1eB8LZD/6FD5fXdANEr8vgnwYyrf OaOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si3291842plr.25.2019.09.05.16.07.44; Thu, 05 Sep 2019 16:08:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403988AbfIETup (ORCPT + 99 others); Thu, 5 Sep 2019 15:50:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9778 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732721AbfIETt0 (ORCPT ); Thu, 5 Sep 2019 15:49:26 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 581453082E03; Thu, 5 Sep 2019 19:49:26 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BC1360C18; Thu, 5 Sep 2019 19:49:18 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id BD853220CEE; Thu, 5 Sep 2019 15:49:17 -0400 (EDT) From: Vivek Goyal To: linux-fsdevel@vger.kernel.org, virtualization@lists.linux-foundation.org, miklos@szeredi.hu Cc: linux-kernel@vger.kernel.org, virtio-fs@redhat.com, vgoyal@redhat.com, stefanha@redhat.com, dgilbert@redhat.com, mst@redhat.com Subject: [PATCH 01/18] virtiofs: Remove request from processing list before calling end Date: Thu, 5 Sep 2019 15:48:42 -0400 Message-Id: <20190905194859.16219-2-vgoyal@redhat.com> In-Reply-To: <20190905194859.16219-1-vgoyal@redhat.com> References: <20190905194859.16219-1-vgoyal@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 05 Sep 2019 19:49:26 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In error path we are calling fuse_request_end() but we need to clear FR_SENT bit as well as remove request from processing queue. Otherwise fuse_request_end() triggers a warning as well as other issues show up. Signed-off-by: Vivek Goyal --- fs/fuse/virtio_fs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index 197e79e536f9..a708ccb65662 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -826,6 +826,10 @@ __releases(fiq->waitq.lock) } req->out.h.error = ret; pr_err("virtio-fs: virtio_fs_enqueue_req() failed %d\n", ret); + spin_lock(&fpq->lock); + clear_bit(FR_SENT, &req->flags); + list_del_init(&req->list); + spin_unlock(&fpq->lock); fuse_request_end(fc, req); return; } -- 2.20.1