fs/ntfs3: Add ckeck in ni_update_parent()
[ Upstream commit 87d1888aa40f25773fa0b948bcb2545f97e2cb15 ] Check simple case when parent inode equals current inode. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
768e857ac3
commit
fc91bb3e1b
1 changed files with 6 additions and 0 deletions
|
|
@ -3198,6 +3198,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)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue