Unverified Commit 48bc7de5 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14963 exfat: fix the infinite loop in exfat_readdir()

parents f8c09dd6 95d96e3e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent
			type = exfat_get_entry_type(ep);
			if (type == TYPE_UNUSED) {
				brelse(bh);
				break;
				goto out;
			}

			if (type != TYPE_FILE && type != TYPE_DIR) {
@@ -189,6 +189,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent
		}
	}

out:
	dir_entry->namebuf.lfn[0] = '\0';
	*cpos = EXFAT_DEN_TO_B(dentry);
	return 0;