Re: [PATCH 2/2] ntfs3: remove warning

Konstantin Komarov
2024-04-17T16:07:10Z

On 25.03.2024 11:34, Christian Brauner wrote:
> This causes visible changes for users that rely on ntfs3 to serve as an
> alternative for the legacy ntfs driver. Print statements such as this
> should probably be made conditional on a debug config option or similar.
>
> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> Cc: Johan Hovold <johan@kernel.org>
> Link: https://lore.kernel.org/r/Zf2zPf5TO5oYt3I3@hovoldconsulting.com
> Signed-off-by: Christian Brauner <brauner@kernel.org>
> ---
> fs/ntfs3/inode.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
> index eb7a8c9fba01..8cc94a6a97ed 100644
> --- a/fs/ntfs3/inode.c
> +++ b/fs/ntfs3/inode.c
> @@ -424,7 +424,6 @@ 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;
> }
Hello Christian, all,

The initial and true reason for multiple warnings is the disregard of
short (DOS) names when counting hard links.

This patch should fixes this bug:
https://lore.kernel.org/ntfs3/0cb0b314-e4f6-40a2-9628-0fe7d905a676@paragon-software.com/T/#u

There is no longer a need to suppress the message itself.