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

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

On Mon, 02 Mar 2020 18:57:15 +0900, Tetsuhiro Kohada said:
> Clean up d_entry rebuilding in exfat_rename_file() and move_file().
>
> -Replace memcpy of d_entry with structure copy.

Those look OK.

> -Change to use the value already stored in fid.

> -		if (exfat_get_entry_type(epnew) == TYPE_FILE) {

> +		if (fid->type == TYPE_FILE) {

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. and at first read it's not obvious to me whether
fid->type is guaranteed to have the correct value already.

(The abundant use of 0xNN constants in exfat_get_entry_type()  doesn't
inspire confidence that it's looking at what you think it's looking at...)



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

  parent reply	other threads:[~2020-03-02 10:30 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 ` Valdis Klētnieks [this message]
2020-03-03  3:07   ` [PATCH 1/2] staging: exfat: clean up d_entry rebuilding Kohada.Tetsuhiro
2020-03-03  3:39     ` Valdis Klētnieks

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=240472.1583144994@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp \
    --cc=Mori.Takahiro@ab.MitsubishiElectric.co.jp \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=motai.hirotaka@aj.mitsubishielectric.co.jp \
    /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