]> Git Repo - linux.git/commitdiff
exfat: remove useless check in exfat_move_file()
authorTetsuhiro Kohada <[email protected]>
Fri, 11 Sep 2020 04:45:06 +0000 (13:45 +0900)
committerNamjae Jeon <[email protected]>
Wed, 21 Oct 2020 23:29:12 +0000 (08:29 +0900)
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 <[email protected]>
Acked-by: Sungjong Seo <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
fs/exfat/namei.c

index 676094f2abe2d13573c7e970cbf595586f46a059..2932b23a3b6c36ebfb82e5a5e7621c07fbb2822d 100644 (file)
@@ -1094,11 +1094,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;
-
        num_old_entries = exfat_count_ext_entries(sb, p_olddir, oldentry,
                epmov);
        if (num_old_entries < 0)
This page took 0.058144 seconds and 4 git commands to generate.