Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1271987ybt; Thu, 2 Jul 2020 00:59:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycpAvWbZuynOcp6fyD28gn3+bdwRc1+aTGIEcqfVxNIIpuH+dRqR/+O414QjBMcpzo4gIZ X-Received: by 2002:a17:906:1a59:: with SMTP id j25mr25048281ejf.398.1593676764523; Thu, 02 Jul 2020 00:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593676764; cv=none; d=google.com; s=arc-20160816; b=uKV7G0/wO8QxbHjWpPEvqH86gZOsGZ2r3WEAGl+G3HyW/z0U0sJYa5w6kX0++xS6Ht q8HhQxT10k+bKcwBluPfM1ym7ivvXQBKH93bWcWG+dcteVWPNKO9h9oQgFj4IIpYQFSr mAiA+GOOPCkuxGxNjf1u3YrJLohcqVCX6hxfJjo6o2Sgw+ZBO+OBa9wmALWbVGWjq5zM T/tH+Djm36X/AbPsL1gd7xKsbgxKRvUt4Gg+9v4HBwSM+ApITThx4yscQnE9SceFH4uf WFptijyiwzM4/n7Jb/BDmJzV78K4mU+UlG41T59OrBvd55TQvZm1zWgfvr75tHJuEC+c S4dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=y0tjpFxzWtN77gkqGk4Ekxq65pr5lwbHPItxIq9dvB4=; b=fXM1f145q3R50w1bYAp/3FoP+KJG8L4RMBsBqkF6fCRQv606DAFu5aCgMJHgze0vPT paMhkxTfzvB7Arfc/Bh3J/YENU5MTZcvvSr8E8XOXSUBS95ZfIQAEnlh8/jP85ytuMa5 UabMBIhVhh18X64JD4EDQqdrId+iCyjIYZ50hlv6GQUed7U/UHPJPzw9KuJM4Afjg4mX rNscHdjLq8hi7D+kVfhpc/3nyC5vKYrO8ZUSDZ/QQy0z/WUza4daeJHmc7SDxoTeL089 my29uSPJpU3IWYDLeJv5LYyTgbts/K/9/zNAyBlzEedTMFptTbc5VGtlrcox1RABTlHj Fnbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v6si5178010eje.743.2020.07.02.00.59.01; Thu, 02 Jul 2020 00:59:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727847AbgGBH4o (ORCPT + 99 others); Thu, 2 Jul 2020 03:56:44 -0400 Received: from nautica.notk.org ([91.121.71.147]:34302 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725287AbgGBH4o (ORCPT ); Thu, 2 Jul 2020 03:56:44 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id 46763C021; Thu, 2 Jul 2020 09:56:42 +0200 (CEST) Date: Thu, 2 Jul 2020 09:56:27 +0200 From: Dominique Martinet To: Jianyong Wu Cc: "ericvh@gmail.com" , "lucho@ionkov.net" , "v9fs-developer@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , Steve Capper , Kaly Xin , Justin He , Wei Chen Subject: Re: [PATCH v2] 9p: retrieve fid from file when file instance exist. Message-ID: <20200702075627.GA23996@nautica> References: <20200701023821.5387-1-jianyong.wu@arm.com> <20200701105927.GA20762@nautica> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jianyong Wu wrote on Thu, Jul 02, 2020: > Yeah, should check fid before "v9fs_fid_lookup", how about > > if (iattr->ia_valid & ATTR_FILE) { > fid = iattr->ia_file->private_data; > WARN_ON(!fid); > } > If (!fid) > fid = v9fs_fid_lookup(dentry); Yes, that would be fine. -- Dominique