mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
fs/ntfs3: Fix getting file type
[ Upstream commit 24c5100aceedcd47af89aaa404d4c96cd2837523 ] An additional condition causes the mft record to be read from disk and get the file type dt_type. Fixes: 22457c047ed97 ("fs/ntfs3: Modified fix directory element type detection") Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
2f4ddb5a17
commit
055f22654a
1 changed files with 2 additions and 1 deletions
|
@ -326,7 +326,8 @@ static inline int ntfs_filldir(struct ntfs_sb_info *sbi, struct ntfs_inode *ni,
|
||||||
* It does additional locks/reads just to get the type of name.
|
* It does additional locks/reads just to get the type of name.
|
||||||
* Should we use additional mount option to enable branch below?
|
* Should we use additional mount option to enable branch below?
|
||||||
*/
|
*/
|
||||||
if ((fname->dup.fa & FILE_ATTRIBUTE_REPARSE_POINT) &&
|
if (((fname->dup.fa & FILE_ATTRIBUTE_REPARSE_POINT) ||
|
||||||
|
fname->dup.ea_size) &&
|
||||||
ino != ni->mi.rno) {
|
ino != ni->mi.rno) {
|
||||||
struct inode *inode = ntfs_iget5(sbi->sb, &e->ref, NULL);
|
struct inode *inode = ntfs_iget5(sbi->sb, &e->ref, NULL);
|
||||||
if (!IS_ERR_OR_NULL(inode)) {
|
if (!IS_ERR_OR_NULL(inode)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue