From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 0376A80067 for ; Wed, 23 Sep 2026 12:52:18 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68NCp34L000923; Wed, 23 Sep 2026 15:51:04 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68NCp34L000923 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="Yd3ZQlhT" Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68NCp0EJ000915 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 23 Sep 2026 15:51:00 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68NCp0EJ000915 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-49e65bee41aso7186325e9.0 for ; Wed, 23 Sep 2026 05:51:00 -0700 (PDT) X-Gm-Message-State: AFuF++lSGmZCfALrrE5YK/c5hobhFyMYriabUdPpuzjCpGy6QqwNzDeI 6IGovLYG5DOcL1snjxFQ3AkGk3Z0QcnUC3uL7SepuqH+mGMugmx2ur2lDjrfv4FSMI0jzDbgi53 TXtkjTYE9S9ZLHU9mYHEW9Uc5j+KiF0Y0lhJYue243eKlWxXKf7uQ3A== X-Gm-Gg: AYBFou2Xnxd2VjFy3KSMxlmvDXPNtD41PIETgAWeRXx/0bA99N+RQ2B+B/fPX8bjqPA 0Zj6+qNHPFVwv5/NQu83fPYyPA6jN9z010VbHxlxaaEUk5QW4Dh0vITMy/eiU73dJtqy8PLsMDH 9spukaxL9VhHkUTp07bD2J2tq+h0f8Y1ZV/dWHV43t1dPvdXGr5ew1h8+MecgXZJ3mAyL7Cz3wN F2L5JvjG75lNQw+i7XkXJuUEdo/uTlnuSf7UkUQo8zGvhJf+CFNHwI+CE1hN5RIxxzZ/FozTcVo AQ9MIrMKxgTZEot8YHg5RNNMHMLpUdE4pIgO6BZZZbl1S1eVq31S9FThONHpa9MjIP04Y2Gt4bH XrKFUBlys9TxxBVM= X-Received: by 2002:a05:600c:6d8e:b0:49c:ff66:7d88 with SMTP id 5b1f17b1804b1-49fd883cd5emr72097175e9.7.1790167860248; Wed, 23 Sep 2026 05:51:00 -0700 (PDT) X-Received: by 2002:a05:600c:6d8e:b0:49c:ff66:7d88 with SMTP id 5b1f17b1804b1-49fd883cd5emr72096715e9.7.1790167859676; Wed, 23 Sep 2026 05:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1790167859; cv=none; d=google.com; s=arc-20260327; b=nDlXaTCO+OXOUgAsh5BA/6EDRkCIpPZvYlWvPPf8XwXxxYZ+wZElTXtE0S4kUmlqKJ mnTjr3VGPpDRgDnorDLXDZikN/OMJacTeKIsDzbuUdrRMmSOnFq/BRFiMMw6rEeUhDG4 KJrSlE7RuDpBz/qqc9F6AFwb6czGLnsmIS/6K5aqP4SUqTZpfkJ0kPhfbrTQ5zkA5xvX 85dA2+Dn+oI36QSsuebNBFWCRRsu+kekmTjA2A12RXSG3cCZ20yNclz74G5TSg6+thAe DhtBmAQmApJ/2+3HajPR1dWY3TTbe4QcDHOfSOBYOgkj32Njd77/6oEKKXlQzrpMh/oo RnEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=Fy8dIDK0XQ3Q5XIFaEXENJwfQ5tKzk01XW+6yjuPlAg=; fh=6JpqpGxFeFNaDh+k4t2UfZyo3rKe/54dyQ52T8vVmSc=; b=SdX6FMElzJfgXZ0AjlK3NBv5igRdSkDsuSZqtaEdiAmbh8ZsLy6Lu7obDAH5kqunNs JxP2RCrxs9HMiik7W9oRkkeAA9qZKgtUox5HOhAtQm+4b81WedWO8v6ctNwFx3Or9npO FDDcEH55SgcGNOtgzeJ/i1+Yv+au+oQSWiMjgC6h0cArubOGDDLy1nqrJISNZBoRQJ6b vh5frwQPN8wHA6PmrQjduZFwL+VPdaNwZsjUZyHKB4Odv2vnZcQqMYjo+l7HpCzbaH9L LGf72WYg0D4gXNGQ7XG2CNwpyfuUrKCVOg20CTkEQV6nJuGbSQJ6r6aSrlAQ9OSgpYqP yHFw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=Yd3ZQlhT; spf=pass (google.com: domain of kui.liu@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=kui.liu@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-488688adc59si3985560f8f.75.2026.09.23.05.50.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2026 05:50:59 -0700 (PDT) Received-SPF: pass (google.com: domain of kui.liu@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=Yd3ZQlhT; spf=pass (google.com: domain of kui.liu@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=kui.liu@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Message-Id:Content-Type:MIME-Version:Subject:Date :From; bh=Fy8dIDK0XQ3Q5XIFaEXENJwfQ5tKzk01XW+6yjuPlAg=; b=Yd3ZQlhTexOPZHdIJWD nSYrZpi8v1GDzN3H5CA4s1rp28QbATCo0HGyKQ/XQCFPzblo0E34VM9GWobSB0otkiWIXcyry8dck 9oFf+FSaUKLA9G3s1YMnLpbXxPtMRr1upPtov0Ba3H2ycarSZcgh4DdFKslE/uWavLDH8D/uadexy KDWp5tgUbmC2obA8cXhE14tMetIsZYrkYp0MdnBgk/cQLZF+v2KtO/Bf6WSLOYFVW5n5l3CqWy4hn mrt/akLNOFK8k0NxuJP3re8z+rj0jOfa9wQZRCXfbhNahDOKtfo8vic2XAva4v9WoC5C6XfvLgIZx NLVjnO1PMhArRYw==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=LK-MBP.local) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1x9MOD-003Xz8-2n; Wed, 23 Sep 2026 14:50:58 +0200 From: Liu Kui Date: Wed, 23 Sep 2026 20:50:40 +0800 MIME-Version: 1.0 Message-Id: <20260923-vstor-145614-unify-v1-1-3907084ba107@virtuozzo.com> References: <20260923-vstor-145614-unify-v1-0-3907084ba107@virtuozzo.com> In-Reply-To: <20260923-vstor-145614-unify-v1-0-3907084ba107@virtuozzo.com> To: Konstantin Khorenko X-Mailer: b4 0.16.0 X-OZ-Fwd: true Cc: azaitsev@virtuozzo.com, devel@openvz.org, Liu Kui Subject: [Devel] [PATCH hci-8.0 1/2] Revert "fs/fuse: fix fuse file refcount leak on close_wait writeback" X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org This reverts commit 4c648a077765fdb61aa1298ecb8205b629411fed. The fix addressed the fuse file refcount leak on close_wait writeback by moving the wpa's reference acquisition from allocation time back to submit/promotion time, so that wpas freed without passing through fuse_writepage_finish() own no reference. Revert it in favor of the following patch, which fixes the leak while keeping the allocation-time ownership model of mainline commit 4046d3adcca4 ("fuse: move fuse file initialization to wpa allocation time") unmodified. https://virtuozzo.atlassian.net/browse/VSTOR-145614 Signed-off-by: Liu Kui --- fs/fuse/file.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 50d3f8186d39..180f60fc539a 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -2181,7 +2181,7 @@ static ssize_t fuse_splice_write(struct pipe_inode_info *pipe, struct file *out, static void fuse_writepage_free(struct fuse_writepage_args *wpa) { struct fuse_args_pages *ap = &wpa->ia.ap; - struct fuse_conn *fc = get_fuse_conn(wpa->inode); + struct fuse_conn *fc = wpa->ia.ff->fm->fc; int i; if (wpa->bucket) @@ -2374,7 +2374,6 @@ static void fuse_writepage_end(struct fuse_mount *fm, struct fuse_args *args, wpa->next = next->next; next->next = NULL; - next->ia.ff = fuse_file_get(wpa->ia.ff); tree_insert(&fi->writepages, next); /* @@ -2524,7 +2523,7 @@ static struct fuse_writepage_args *fuse_writepage_args_setup(struct folio *folio fuse_write_args_fill(&wpa->ia, ff, inode, folio_pos(folio), 0); wpa->ia.write.in.write_flags |= FUSE_WRITE_CACHE; wpa->inode = inode; - wpa->ia.ff = NULL; + wpa->ia.ff = ff; ap = &wpa->ia.ap; ap->args.in_pages = true; @@ -2562,7 +2561,6 @@ static int fuse_writepage_locked(struct folio *folio) if (!wpa) goto err_writepage_args; - wpa->ia.ff = ff; ap = &wpa->ia.ap; ap->num_pages = 1; @@ -2630,7 +2628,6 @@ static void fuse_writepages_send(struct fuse_fill_wb_data *data) int num_pages = wpa->ia.ap.num_pages; int i; - wpa->ia.ff = fuse_file_get(data->ff); spin_lock(&fi->lock); list_add_tail(&wpa->queue_entry, &fi->queued_writes); fuse_flush_writepages(inode); @@ -2794,6 +2791,7 @@ static int fuse_writepages_fill(struct folio *folio, folio_redirty_for_writepage(wbc, folio); goto out_unlock; } + fuse_file_get(wpa->ia.ff); data->max_pages = 1; ap = &wpa->ia.ap; -- Git-155) _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel