[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200703085837.GA3857@nautica>
Date: Fri, 3 Jul 2020 10:58:37 +0200
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Jianyong Wu <jianyong.wu@....com>
Cc: ericvh@...il.com, lucho@...kov.net,
v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
Steve.Capper@....com, Kaly.Xin@....com, justin.he@....com,
wei.chen@....com
Subject: Re: [PATCH v3] 9p: retrieve fid from file when file instance exist.
Jianyong Wu wrote on Fri, Jul 03, 2020:
> In the current setattr implementation in 9p, fid is always retrieved
> from dentry no matter file instance exists or not. Thus, there may be
> some info related to opened file instance dropped. So it's better
> to retrieve fid from file instance when it has passed to setattr.
>
> for example:
> fd=open("tmp", O_RDWR);
> ftruncate(fd, 10);
>
> The file context related with the fd will be lost as fid is
> retrieved from dentry, then the backend can't get the info of
> file context. It is against the original intention of user and
> may lead to bug.
>
> Signed-off-by: Jianyong Wu <jianyong.wu@....com>
ACK.
I've picked this up for tests, will push to linux-next when I finally
manage to find time for these...
--
Dominique
Powered by blists - more mailing lists