Re: [PATCH v2] 9p: retrieve fid from file when file instance exist.

From: Dominique Martinet
Date: Thu Jul 02 2020 - 03:56:46 EST


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