From nobody Tue Feb 10 01:19:47 2026 Received: from mail-m155101.qiye.163.com (mail-m155101.qiye.163.com [101.71.155.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A04631A555; Fri, 16 Jan 2026 14:28:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=101.71.155.101 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768573735; cv=none; b=FNo4Km9WHr270GWTdXxH8MaBOgxgRCDMbsY28cppl82HQlUDUwhX8bKatsv19PuZDoEvWeX53VqTtOKqBTgGY1Y6qH/jVJS894nHVIO/5pvFD04pK3pnswYbOImUO/MY3x+v8HxuH3fPtFs4CetdwxrO0VZX14pt/L5jlOVfJ24= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768573735; c=relaxed/simple; bh=Wfd7T+XIhqQr3+OaZTeki3o+32YSR0shu5lVic1B5gs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WHZp0sii+KWHKbyKDfuabAzHkNx1KOm6DVZDahFt5dgD3/RpEURUD9KdbtWvDrD4H8URScdOMR9pFXIJNj2ArAtFQFU8QpYuYCiw7zdJ+bSAZucFqVNjKHd7aQcZFFeP+OenBKi5+pBJviTRHSxSE22MuqwPv94RTOyIjCrmAxA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ustc.edu; spf=pass smtp.mailfrom=ustc.edu; arc=none smtp.client-ip=101.71.155.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ustc.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ustc.edu Received: from localhost (unknown [14.22.11.163]) by smtp.qiye.163.com (Hmail) with ESMTP id 30ef1dc9f; Fri, 16 Jan 2026 22:28:49 +0800 (GMT+08:00) From: Chunsheng Luo To: miklos@szeredi.hu Cc: amir73il@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Chunsheng Luo Subject: [PATCH 2/2] fuse: Relax backing file validation to compare backing inodes Date: Fri, 16 Jan 2026 22:28:45 +0800 Message-ID: <20260116142845.422-3-luochunsheng@ustc.edu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260116142845.422-1-luochunsheng@ustc.edu> References: <20260116142845.422-1-luochunsheng@ustc.edu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0a9bc7357c5b03a2kunm62945613268fec X-HM-MType: 10 X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVkaTU1IVh4eGkMYGUpNGEwdS1YeHw5VEwETFhoSFy QUDg9ZV1kYEgtZQVlKT1VJSVVKSlVKTUhZV1kWGg8SFR0UWUFZS1VLVUtVS1kG Content-Type: text/plain; charset="utf-8" To simplify crash recovery and reduce performance impact, backing_ids are not persisted across daemon restarts. However, when the daemon restarts and another process open the same FUSE file and assigning it the same backing file (with the same inode) will also cause the fuse_inode_uncached_io_start() function to fail due to a mismatch in the fb pointer. So Relax the validation in fuse_inode_uncached_io_start() to compare backing inodes instead of fuse_backing pointers. Signed-off-by: Chunsheng Luo Reviewed-by: Amir Goldstein --- fs/fuse/iomode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/iomode.c b/fs/fuse/iomode.c index 3728933188f3..ca7619958b0d 100644 --- a/fs/fuse/iomode.c +++ b/fs/fuse/iomode.c @@ -90,7 +90,7 @@ int fuse_inode_uncached_io_start(struct fuse_inode *fi, s= truct fuse_backing *fb) spin_lock(&fi->lock); /* deny conflicting backing files on same fuse inode */ oldfb =3D fuse_inode_backing(fi); - if (fb && oldfb && oldfb !=3D fb) { + if (fb && oldfb && file_inode(oldfb->file) !=3D file_inode(fb->file)) { err =3D -EBUSY; goto unlock; } --=20 2.43.0