diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/namei.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index a9fd5f48f3bf..daf8260f0b03 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
@@ -1330,6 +1330,12 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, stru | |||
1330 | EXT4_ERROR_INODE(dir, "bad inode number: %u", ino); | 1330 | EXT4_ERROR_INODE(dir, "bad inode number: %u", ino); |
1331 | return ERR_PTR(-EIO); | 1331 | return ERR_PTR(-EIO); |
1332 | } | 1332 | } |
1333 | if (unlikely(ino == dir->i_ino)) { | ||
1334 | EXT4_ERROR_INODE(dir, "'%.*s' linked to parent dir", | ||
1335 | dentry->d_name.len, | ||
1336 | dentry->d_name.name); | ||
1337 | return ERR_PTR(-EIO); | ||
1338 | } | ||
1333 | inode = ext4_iget(dir->i_sb, ino); | 1339 | inode = ext4_iget(dir->i_sb, ino); |
1334 | if (inode == ERR_PTR(-ESTALE)) { | 1340 | if (inode == ERR_PTR(-ESTALE)) { |
1335 | EXT4_ERROR_INODE(dir, | 1341 | EXT4_ERROR_INODE(dir, |