Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp256259imu; Thu, 8 Nov 2018 01:06:57 -0800 (PST) X-Google-Smtp-Source: AJdET5ehS/eSaPKgzTzlQJt8KO1eSFmLDYfuH+AaSpY8vfLopwWosJRSEyVetfETxkfuT5LLH+Zg X-Received: by 2002:a62:83c2:: with SMTP id h185-v6mr3699405pfe.187.1541668017582; Thu, 08 Nov 2018 01:06:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541668017; cv=none; d=google.com; s=arc-20160816; b=NrzY2cdroHgMpw2blQ/crSsyywmGOYZJlq39AIj93SZ7QFc8eGKw4XipmE/3ypA7fS mqilVnmoxjnwcGQEKQsCgOYG7pEu/XSmf4mSv9FuPpekiapyso1ZtHDyZyAG+PzRhPWY SO+lp8HGfiX9zLscSNuCcGBt/sm30/FpV2MI8QtH/h1PWbgcDLpe4iVWV71tgkUNAl8M JtO/N5tXgH3Ibf547dxt2ktHwz0OypNJprB0exYRtdT7GSDY+S0eTDcqjv+IQs0kTjYS VAYSYCyTzbZP/y0bmcDpvA63GuM61efDJTXNYgJbMMPyHwC+l7VCHI3B4mmoRuwerzuG bUlw== 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 :user-agent:references:in-reply-to:message-id:date:to:from:subject; bh=kKhb8A2UZVPcG7Twd9Hqmg2KaeGmEyX2vJpXg1hDa7k=; b=j2F7CrxVLw+8e9/3wegpZC8FrCqKmbcc1YMwWgpqaIEKa2enRoC+TIepGlCoCM0/RT wJyNTN4/iW6t/2Aoy5eMpqEmjy0J4DJImNxTG9cxlJs/FuiJNKWXmrWmOnlFq9pT9DUV dbLjwjxSJnxLPLN8VVbGStrefg8wsZUOzah3Q8M3HYXRTc2Ee5K+Id0Lc4mqKfNkXNr7 usLs0Hnkkz8Ch62DXwEu2qDqbYEbVWh97QELYRZTAgTq4WvDJIcx+iEj93Qhfakr8KYU kKFWXATHD2+kar2gSB3WnFIrudOj0ohlVDhbegF4+Pnmv4wNgVTegLy/Sxk/bM5PWn91 p4Cw== 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=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si3582071plm.126.2018.11.08.01.06.42; Thu, 08 Nov 2018 01:06:57 -0800 (PST) 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=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbeKHSjx (ORCPT + 99 others); Thu, 8 Nov 2018 13:39:53 -0500 Received: from relay.sw.ru ([185.231.240.75]:36770 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726649AbeKHSjw (ORCPT ); Thu, 8 Nov 2018 13:39:52 -0500 Received: from [172.16.25.169] (helo=localhost.localdomain) by relay.sw.ru with esmtp (Exim 4.90_1) (envelope-from ) id 1gKgFc-00062M-9m; Thu, 08 Nov 2018 12:05:20 +0300 Subject: [PATCH v2 1/5] fuse: Kill fasync only if interrupt is queued in queue_interrupt() From: Kirill Tkhai To: miklos@szeredi.hu, ktkhai@virtuozzo.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 08 Nov 2018 12:05:20 +0300 Message-ID: <154166792021.10655.6752271937511795324.stgit@localhost.localdomain> In-Reply-To: <154166765576.10655.15178401490817622677.stgit@localhost.localdomain> References: <154166765576.10655.15178401490817622677.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should sent signal only in case of interrupt is really queued. Not a real problem, but this makes the code clearer and intuitive. v2: Move kill_fasync() under fiq->waitq.lock Signed-off-by: Kirill Tkhai --- fs/fuse/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index ae813e609932..1ecec7fcb841 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -476,9 +476,9 @@ static void queue_interrupt(struct fuse_iqueue *fiq, struct fuse_req *req) if (list_empty(&req->intr_entry)) { list_add_tail(&req->intr_entry, &fiq->interrupts); wake_up_locked(&fiq->waitq); + kill_fasync(&fiq->fasync, SIGIO, POLL_IN); } spin_unlock(&fiq->waitq.lock); - kill_fasync(&fiq->fasync, SIGIO, POLL_IN); } static void request_wait_answer(struct fuse_conn *fc, struct fuse_req *req)