diff options
author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2023-06-30 13:52:19 +0200 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2023-09-28 14:03:55 +0200 |
commit | 87d1888aa40f25773fa0b948bcb2545f97e2cb15 (patch) | |
tree | 8a9120a6749305877424c40d5fb598285eb99f48 /fs | |
parent | Linux 6.6-rc1 (diff) | |
download | linux-87d1888aa40f25773fa0b948bcb2545f97e2cb15.tar.xz linux-87d1888aa40f25773fa0b948bcb2545f97e2cb15.zip |
fs/ntfs3: Add ckeck in ni_update_parent()
Check simple case when parent inode equals current inode.
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ntfs3/frecord.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 2b85cb10f0be..d49fbb22bd5e 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -3208,6 +3208,12 @@ static bool ni_update_parent(struct ntfs_inode *ni, struct NTFS_DUP_INFO *dup, if (!fname || !memcmp(&fname->dup, dup, sizeof(fname->dup))) continue; + /* Check simple case when parent inode equals current inode. */ + if (ino_get(&fname->home) == ni->vfs_inode.i_ino) { + ntfs_set_state(sbi, NTFS_DIRTY_ERROR); + continue; + } + /* ntfs_iget5 may sleep. */ dir = ntfs_iget5(sb, &fname->home, NULL); if (IS_ERR(dir)) { |