Skip to content

Commit 24c5100

Browse files
fs/ntfs3: Fix getting file type
An additional condition causes the mft record to be read from disk and get the file type dt_type. Fixes: 22457c0 ("fs/ntfs3: Modified fix directory element type detection") Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 1c308ac commit 24c5100

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/ntfs3/dir.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ static inline int ntfs_filldir(struct ntfs_sb_info *sbi, struct ntfs_inode *ni,
326326
* It does additional locks/reads just to get the type of name.
327327
* Should we use additional mount option to enable branch below?
328328
*/
329-
if ((fname->dup.fa & FILE_ATTRIBUTE_REPARSE_POINT) &&
329+
if (((fname->dup.fa & FILE_ATTRIBUTE_REPARSE_POINT) ||
330+
fname->dup.ea_size) &&
330331
ino != ni->mi.rno) {
331332
struct inode *inode = ntfs_iget5(sbi->sb, &e->ref, NULL);
332333
if (!IS_ERR_OR_NULL(inode)) {

0 commit comments

Comments
 (0)