Skip to content

Commit 87d1888

Browse files
fs/ntfs3: Add ckeck in ni_update_parent()
Check simple case when parent inode equals current inode. Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 0bb80ec commit 87d1888

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fs/ntfs3/frecord.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3208,6 +3208,12 @@ static bool ni_update_parent(struct ntfs_inode *ni, struct NTFS_DUP_INFO *dup,
32083208
if (!fname || !memcmp(&fname->dup, dup, sizeof(fname->dup)))
32093209
continue;
32103210

3211+
/* Check simple case when parent inode equals current inode. */
3212+
if (ino_get(&fname->home) == ni->vfs_inode.i_ino) {
3213+
ntfs_set_state(sbi, NTFS_DIRTY_ERROR);
3214+
continue;
3215+
}
3216+
32113217
/* ntfs_iget5 may sleep. */
32123218
dir = ntfs_iget5(sb, &fname->home, NULL);
32133219
if (IS_ERR(dir)) {

0 commit comments

Comments
 (0)