kernel-hacking-2024-linux-s.../fs/ext3
Jan Kara e643692138 ext3: fix data=journal fast mount/umount hang
In data=journal mode, if we unmount the file system before a
transaction has a chance to complete, when the journal inode is being
evicted, we can end up calling into log_wait_commit() for the
last transaction, after the journalling machinery has been shut down.
That triggers the WARN_ONCE in __log_start_commit().

Arguably we should adjust ext3_should_journal_data() to return FALSE
for the journal inode, but the only place it matters is
ext3_evict_inode(), and so it's to save a bit of CPU time, and to make
the patch much more obviously correct by inspection(tm), we'll fix it
by explicitly not trying to waiting for a journal commit when we are
evicting the journal inode, since it's guaranteed to never succeed in
this case.

This can be easily replicated via:

     mount -t ext3 -o data=journal /dev/vdb /vdb ; umount /vdb

This is a port of ext4 fix from Ted Ts'o.

Signed-off-by: Jan Kara <jack@suse.cz>
2013-03-20 14:49:04 +01:00
..
acl.c userns: Convert extN to support kuids and kgids in posix acls 2012-09-18 01:01:36 -07:00
acl.h
balloc.c ext3: Avoid underflow of in ext3_trim_fs() 2012-11-19 21:36:12 +01:00
bitmap.c ext3: use memweight() 2012-07-30 17:25:16 -07:00
dir.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ext3.h
ext3_jbd.c
file.c
fsync.c
hash.c
ialloc.c
inode.c ext3: fix data=journal fast mount/umount hang 2013-03-20 14:49:04 +01:00
ioctl.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
Kconfig
Makefile
namei.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
namei.h ext3: ext3_bread usage audit 2012-10-09 23:21:42 +02:00
resize.c Ext3: return ENOMEM rather than EIO if sb_getblk fails 2013-01-21 11:19:57 +01:00
super.c ext3: Fix format string issues 2013-03-11 22:05:56 +01:00
symlink.c
xattr.c Ext3: return ENOMEM rather than EIO if sb_getblk fails 2013-01-21 11:19:57 +01:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c