diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-10-05 22:56:00 -0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-11-13 19:02:34 +0100 |
commit | bead15b503cf4007a0383f6e8a7409569c41a546 (patch) | |
tree | 381148640feaec910b546a6e0efbf374f8b7be1e /fs/ext4/super.c | |
parent | 147261f789cb5b1f0d62459f849c18dea7ada958 (diff) | |
download | lwn-bead15b503cf4007a0383f6e8a7409569c41a546.tar.gz lwn-bead15b503cf4007a0383f6e8a7409569c41a546.zip |
ext4: add ext4_iget_normal() which is to be used for dir tree lookups
commit f4bb2981024fc91b23b4d09a8817c415396dbabb upstream.
If there is a corrupted file system which has directory entries that
point at reserved, metadata inodes, prohibit them from being used by
treating them the same way we treat Boot Loader inodes --- that is,
mark them to be bad inodes. This prohibits them from being opened,
deleted, or modified via chmod, chown, utimes, etc.
In particular, this prevents a corrupted file system which has a
directory entry which points at the journal inode from being deleted
and its blocks released, after which point Much Hilarity Ensues.
Reported-by: Sami Liedes <sami.liedes@iki.fi>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index cf3068a50b48..2914dc7ce9e8 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -977,7 +977,7 @@ static struct inode *ext4_nfs_get_inode(struct super_block *sb, * Currently we don't know the generation for parent directory, so * a generation of 0 means "accept any" */ - inode = ext4_iget(sb, ino); + inode = ext4_iget_normal(sb, ino); if (IS_ERR(inode)) return ERR_CAST(inode); if (generation && inode->i_generation != generation) { |