[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <015f01d68bd1$95ace4d0$c106ae70$@samsung.com>
Date: Wed, 16 Sep 2020 11:32:12 +0900
From: "Sungjong Seo" <sj1557.seo@...sung.com>
To: "'Tetsuhiro Kohada'" <kohada.t2@...il.com>
Cc: <kohada.tetsuhiro@...mitsubishielectric.co.jp>,
<mori.takahiro@...mitsubishielectric.co.jp>,
<motai.hirotaka@...mitsubishielectric.co.jp>,
"'Namjae Jeon'" <namjae.jeon@...sung.com>,
<linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/3] exfat: remove useless check in exfat_move_file()
> In exfat_move_file(), the identity of source and target directory has been
> checked by the caller.
> Also, it gets stream.start_clu from file dir-entry, which is an invalid
> determination.
>
> Signed-off-by: Tetsuhiro Kohada <kohada.t2@...il.com>
> ---
> fs/exfat/namei.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index
> 803748946ddb..1c433491f771 100644
> --- a/fs/exfat/namei.c
> +++ b/fs/exfat/namei.c
> @@ -1095,11 +1095,6 @@ static int exfat_move_file(struct inode *inode,
> struct exfat_chain *p_olddir,
> if (!epmov)
> return -EIO;
>
> - /* check if the source and target directory is the same */
> - if (exfat_get_entry_type(epmov) == TYPE_DIR &&
> - le32_to_cpu(epmov->dentry.stream.start_clu) == p_newdir->dir)
> - return -EINVAL;
> -
It might check if the cluster numbers are same between source entry and
target directory.
Could you let me know what code you mentioned?
Or do you mean the codes on vfs?
> num_old_entries = exfat_count_ext_entries(sb, p_olddir, oldentry,
> epmov);
> if (num_old_entries < 0)
> --
> 2.25.1
Powered by blists - more mailing lists