From: Dominique Martinet <asmadeus@codewreck.org>
To: Jianyong Wu <jianyong.wu@arm.com>
Cc: ericvh@gmail.com, lucho@ionkov.net,
v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Steve.Capper@arm.com,
Kaly.Xin@arm.com, justin.he@arm.com, wei.chen@arm.com
Subject: Re: [PATCH v3] 9p: retrieve fid from file when file instance exist.
Date: Fri, 3 Jul 2020 10:58:37 +0200 [thread overview]
Message-ID: <20200703085837.GA3857@nautica> (raw)
In-Reply-To: <20200703082018.8160-1-jianyong.wu@arm.com>
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@arm.com>
ACK.
I've picked this up for tests, will push to linux-next when I finally
manage to find time for these...
--
Dominique
prev parent reply other threads:[~2020-07-03 8:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 8:20 Jianyong Wu
2020-07-03 8:58 ` Dominique Martinet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200703085837.GA3857@nautica \
--to=asmadeus@codewreck.org \
--cc=Kaly.Xin@arm.com \
--cc=Steve.Capper@arm.com \
--cc=ericvh@gmail.com \
--cc=jianyong.wu@arm.com \
--cc=justin.he@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=v9fs-developer@lists.sourceforge.net \
--cc=wei.chen@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®