Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1457638ybe; Thu, 5 Sep 2019 16:04:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeSR8IZqxRmku7V351oR/TfgLCBMqCcOQDwfHjZW5Zz3e8UFgkhHgGpET5jFFxoOy72XLV X-Received: by 2002:aa7:8a83:: with SMTP id a3mr6876607pfc.115.1567724675068; Thu, 05 Sep 2019 16:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567724675; cv=none; d=google.com; s=arc-20160816; b=Sw99ud8P16Ilpp0HXH0VEfmPoSjOzgq//fijcnlFONr7sFyMT2a4kCLjklW4S7Z1pa x9Esn2CtABjRXm5REITXiSqszxPbOEqcwYfJGE3k1EdEQE2FYBHSjiCJSHx1XKVYMZ7i jb8dEkEE3Bi06n5OXybSgXidpLrR6My7JOuQrd+P4QIY2Xv/rCVzQgSDj2wFHXXpOFlG una137Vr+OY1fW1t6DCRUoyA7Nweufbrwwuc3YYDAB/0R8tUhOfdQxlaHpsfBVkEvwYt LBvqD/dXpvFAXYwaNdw3jt4g2l/hfZMhmckHsHAe22RZ/fa0VeuXWaRVHUP2iV5vz3Ci 7rzg== 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=361xfejbQw1C4LTqxdmPajhLv9FqbvY7pM/Md/aoKP4=; b=edmydeYo41UmUENi0hdIsLgkASHW6S1bWKoZsMHn5ictu0Eop24Ieet+gEyUVp98e7 q5OJWoO/EUL4Uyi/d8vTD0NpIxY8Eqm7C9caJ8DcPtt0gW1eQyg9/v6Ltxoo+ouHYFSG Yyiub2YuRgMPPyKh7E7jCM54MZV+WulKA2aNtSYz8Ay/d3AYnd2tztDiPfo3YBQxcv30 Kbdt09yXRpvWM0qK6lVO7EsbZw77ZENo8n7aN/NKJtTUI3awaqjdDnN7FRzPpTn/6YO/ 2i4ArZhF+KShhGpyk+RrcBqHLNmHv9v1SNOmbgc7/LgEWSaTw4ZjfGjbIMiGwO/8aqr3 /3Wg== 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 i133si2863224pgc.109.2019.09.05.16.04.19; Thu, 05 Sep 2019 16:04:35 -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 S2390271AbfIETti (ORCPT + 99 others); Thu, 5 Sep 2019 15:49:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49358 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388340AbfIETt1 (ORCPT ); Thu, 5 Sep 2019 15:49:27 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2CCCC30860B9; Thu, 5 Sep 2019 19:49:27 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 093FD5C1D4; Thu, 5 Sep 2019 19:49:27 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 30FDB2253AA; Thu, 5 Sep 2019 15:49:18 -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 18/18] virtiofs: Remove TODO item from virtio_fs_free_devs() Date: Thu, 5 Sep 2019 15:48:59 -0400 Message-Id: <20190905194859.16219-19-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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 05 Sep 2019 19:49:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org virtio_fs_free_devs() is now called from ->kill_sb(). By this time all device queues have been quiesced. I am assuming that while ->kill_sb() is in progress, another mount instance will wait for it to finish (sb->s_umount mutex provides mutual exclusion). W.r.t ->remove path, we should be fine as we are not touching vdev or virtqueues. And we have reference on virtio_fs object, so we know rest of the data structures are valid. So I can't see the need of any additional locking yet. Signed-off-by: Vivek Goyal --- fs/fuse/virtio_fs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index eadaea6eb8e2..61aa3eba7b22 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -200,8 +200,6 @@ static void virtio_fs_free_devs(struct virtio_fs *fs) { unsigned int i; - /* TODO lock */ - for (i = 0; i < fs->nvqs; i++) { struct virtio_fs_vq *fsvq = &fs->vqs[i]; -- 2.20.1