Commit 87d1888a authored by Konstantin Komarov's avatar Konstantin Komarov

fs/ntfs3: Add ckeck in ni_update_parent()

Check simple case when parent inode equals current inode.
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 0bb80ecc
...@@ -3208,6 +3208,12 @@ static bool ni_update_parent(struct ntfs_inode *ni, struct NTFS_DUP_INFO *dup, ...@@ -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))) if (!fname || !memcmp(&fname->dup, dup, sizeof(fname->dup)))
continue; 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. */ /* ntfs_iget5 may sleep. */
dir = ntfs_iget5(sb, &fname->home, NULL); dir = ntfs_iget5(sb, &fname->home, NULL);
if (IS_ERR(dir)) { if (IS_ERR(dir)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment