diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-10-05 22:56:00 -0400 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2014-11-05 11:43:05 +0000 |
commit | ba55c5e8a376e820a07bb026993b2c8f6de9691f (patch) | |
tree | bcd9f50952d7ebf6d62dd4e818b557592b5e8dd3 /fs/ext4/ext4.h | |
parent | e1956e85e59ef074d954ca4ba2771a0935527ebb (diff) | |
download | linux-stable-ba55c5e8a376e820a07bb026993b2c8f6de9691f.tar.gz linux-stable-ba55c5e8a376e820a07bb026993b2c8f6de9691f.tar.bz2 linux-stable-ba55c5e8a376e820a07bb026993b2c8f6de9691f.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: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index b6874405f0dc..2f4eb9f9d634 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -2108,6 +2108,7 @@ int do_journal_get_write_access(handle_t *handle, #define CONVERT_INLINE_DATA 2 extern struct inode *ext4_iget(struct super_block *, unsigned long); +extern struct inode *ext4_iget_normal(struct super_block *, unsigned long); extern int ext4_write_inode(struct inode *, struct writeback_control *); extern int ext4_setattr(struct dentry *, struct iattr *); extern int ext4_getattr(struct vfsmount *mnt, struct dentry *dentry, |