linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Tetsuhiro Kohada <Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp>
Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-fsdevel@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org,
	Mori.Takahiro@ab.MitsubishiElectric.co.jp,
	motai.hirotaka@aj.mitsubishielectric.co.jp
Subject: Re: [PATCH] staging: exfat: remove 'vol_type' variable.
Date: Wed, 29 Jan 2020 18:15:41 +0300	[thread overview]
Message-ID: <20200129151541.GB1778@kadam> (raw)
In-Reply-To: <20200129111232.78539-1-Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp>

On Wed, Jan 29, 2020 at 08:12:32PM +0900, Tetsuhiro Kohada wrote:
> @@ -2085,7 +2069,7 @@ static int exfat_readdir(struct file *filp, struct dir_context *ctx)
>  
>  	cpos = ctx->pos;
>  	/* Fake . and .. for the root directory. */
> -	if ((p_fs->vol_type == EXFAT) || (inode->i_ino == EXFAT_ROOT_INO)) {
> +	if (inode->i_ino == EXFAT_ROOT_INO) {

This isn't right.  The first condition is always true so in the original
code we never bothered to check the second condition.

>  		while (cpos < 2) {
>  			if (inode->i_ino == EXFAT_ROOT_INO)
>  				inum = EXFAT_ROOT_INO;

regards,
dan carpenter


      reply	other threads:[~2020-01-29 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 11:12 [PATCH] staging: exfat: remove 'vol_type' variable Tetsuhiro Kohada
2020-01-29 15:15 ` Dan Carpenter [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=20200129151541.GB1778@kadam \
    --to=dan.carpenter@oracle.com \
    --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 \
    --cc=valdis.kletnieks@vt.edu \
    /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;
as well as URLs for NNTP newsgroup(s).