summaryrefslogtreecommitdiffstats
path: root/fs/quota
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-08-16 22:06:55 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-08-16 22:06:55 -0400
commit19883bd9658d0dc269fc228b1b39db3615f7c7b0 (patch)
tree06332ad032dc6d8b0af0d505c6e71b3707df58e6 /fs/quota
parent0e20270454e45ff54c9f8546159924038e31bfa0 (diff)
downloadop-kernel-dev-19883bd9658d0dc269fc228b1b39db3615f7c7b0.zip
op-kernel-dev-19883bd9658d0dc269fc228b1b39db3615f7c7b0.tar.gz
ext4: avoid reusing recently deleted inodes in no journal mode
In no journal mode, if an inode has recently been deleted, we shouldn't reuse it right away. Otherwise it's possible, after an unclean shutdown, to hit a situation where a recently deleted inode gets reused for some other purpose before the inode table block has been written to disk. However, if the directory entry has been updated, then the directory entry will be pointing at the old inode contents. E2fsck will make sure the file system is consistent after the unclean shutdown. However, if the recently deleted inode is a character mode device, or an inode with the immutable bit set, even after the file system has been fixed up by e2fsck, it can be possible for a *.pyc file to be pointing at a character mode device, and when python tries to open the *.pyc file, Hilarity Ensues. We could change all of userspace to be very suspicious about stat'ing files before opening them, and clearing the immutable flag if necessary --- or we can just avoid reusing an inode number if it has been recently deleted. Google-Bug-Id: 10017573 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/quota')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud