public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: "Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp" 
	<Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp>
Cc: "Mori.Takahiro@ab.MitsubishiElectric.co.jp" 
	<Mori.Takahiro@ab.MitsubishiElectric.co.jp>,
	"Motai.Hirotaka@aj.MitsubishiElectric.co.jp" 
	<Motai.Hirotaka@aj.MitsubishiElectric.co.jp>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] staging: exfat: clean up d_entry rebuilding.
Date: Mon, 02 Mar 2020 22:39:19 -0500	[thread overview]
Message-ID: <295313.1583206759@turing-police> (raw)
In-Reply-To: <TY1PR01MB1578983D124E99FB66FB707190E40@TY1PR01MB1578.jpnprd01.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

On Tue, 03 Mar 2020 03:07:51 +0000, "Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp" said:

> > Are you sure this is OK to do? exfat_get_entry_type() does a lot of
> > mapping between values, using a file_dentry_t->type, while
> > fid->type is a file_id_t->type.

> The value that vfs sets to the old_dentry of exfat_rename() is the dentry value returned by exfat_lookup(), exfat_create(), and create_dir().
> In each function, the value of dentry->fid is initialized to fid->type at create_file(), ffsLookupFile(), and create_dir().
>
>  * create_file() <- ffsCreateFile() <-exfat_create()
>  * ffsLookupFile() <- exfat_find() <-exfat_lookup()
>  * exfat_mkdir() <- ffsCreateDir() <-create_dir()
>
> > and at first read it's not obvious to
> > me whether type is guaranteed to have the correct value already.
>
> A valid value is set in fid->type for all paths.
> What do you think?

OK, that's the part I was worried about, but I hadn't had enough caffeine
to do that analysis.  Thanks.

Acked-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>


[-- Attachment #2: Type: application/pgp-signature, Size: 832 bytes --]

      reply	other threads:[~2020-03-03  3:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02  9:57 [PATCH 1/2] staging: exfat: clean up d_entry rebuilding Tetsuhiro Kohada
2020-03-02  9:57 ` [PATCH 2/2] staging: exfat: remove redundant if statements Tetsuhiro Kohada
2020-03-02 10:29 ` [PATCH 1/2] staging: exfat: clean up d_entry rebuilding Valdis Klētnieks
2020-03-03  3:07   ` Kohada.Tetsuhiro
2020-03-03  3:39     ` Valdis Klētnieks [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=295313.1583206759@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp \
    --cc=Mori.Takahiro@ab.MitsubishiElectric.co.jp \
    --cc=Motai.Hirotaka@aj.MitsubishiElectric.co.jp \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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