From: Konstantin Komarov Date: Fri, 24 Nov 2023 08:34:24 +0000 (+0300) Subject: fs/ntfs3: Print warning while fixing hard links count X-Git-Tag: v6.6.19~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa2a041a490d791a3e5bceb47dab25bd6042dca3;p=thirdparty%2Fkernel%2Fstable.git fs/ntfs3: Print warning while fixing hard links count [ Upstream commit 85ba2a75faee759809a7e43b4c103ac59bac1026 ] Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin --- diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index d6d021e19aaa2..fb0466c115040 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -410,7 +410,6 @@ end_enum: goto out; if (!is_match && name) { - /* Reuse rec as buffer for ascii name. */ err = -ENOENT; goto out; } @@ -425,6 +424,7 @@ end_enum: 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; }