Skip to content

Commit

Permalink
fs/ntfs3: Print warning while fixing hard links count
Browse files Browse the repository at this point in the history
[ Upstream commit 85ba2a7 ]

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
aalexandrovich authored and gregkh committed Mar 1, 2024
1 parent d46c2ef commit fa2a041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ntfs3/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ static struct inode *ntfs_read_mft(struct inode *inode,
goto out;

if (!is_match && name) {
/* Reuse rec as buffer for ascii name. */
err = -ENOENT;
goto out;
}
Expand All @@ -425,6 +424,7 @@ static struct inode *ntfs_read_mft(struct inode *inode,

if (names != le16_to_cpu(rec->hard_links)) {
/* Correct minor error on the fly. Do not mark inode as dirty. */
ntfs_inode_warn(inode, "Correct links count -> %u.", names);
rec->hard_links = cpu_to_le16(names);
ni->mi.dirty = true;
}
Expand Down

0 comments on commit fa2a041

Please sign in to comment.