• Theodore Ts'o's avatar
    Revert "ext4: use ext4_write_inode() when fsyncing w/o a journal" · 8fdd60f2
    Theodore Ts'o authored
    This reverts commit ad211f3e.
    
    As Jan Kara pointed out, this change was unsafe since it means we lose
    the call to sync_mapping_buffers() in the nojournal case.  The
    original point of the commit was avoid taking the inode mutex (since
    it causes a lockdep warning in generic/113); but we need the mutex in
    order to call sync_mapping_buffers().
    
    The real fix to this problem was discussed here:
    
    https://lore.kernel.org/lkml/20181025150540.259281-4-bvanassche@acm.org
    
    The proposed patch was to fix a syzbot complaint, but the problem can
    also demonstrated via "kvm-xfstests -c nojournal generic/113".
    Multiple solutions were discused in the e-mail thread, but none have
    landed in the kernel as of this writing.  Anyway, commit
    ad211f3e is absolutely the wrong way to suppress the lockdep, so
    revert it.
    
    Fixes: ad211f3e ("ext4: use ext4_write_inode() when fsyncing w/o a journal")
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    Reported: Jan Kara <jack@suse.cz>
    8fdd60f2
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
acl.c Loading commit data...
acl.h Loading commit data...
balloc.c Loading commit data...
bitmap.c Loading commit data...
block_validity.c Loading commit data...
dir.c Loading commit data...
ext4.h Loading commit data...
ext4_extents.h Loading commit data...
ext4_jbd2.c Loading commit data...
ext4_jbd2.h Loading commit data...
extents.c Loading commit data...
extents_status.c Loading commit data...
extents_status.h Loading commit data...
file.c Loading commit data...
fsmap.c Loading commit data...
fsmap.h Loading commit data...
fsync.c Loading commit data...
hash.c Loading commit data...
ialloc.c Loading commit data...
indirect.c Loading commit data...
inline.c Loading commit data...
inode.c Loading commit data...
ioctl.c Loading commit data...
mballoc.c Loading commit data...
mballoc.h Loading commit data...
migrate.c Loading commit data...
mmp.c Loading commit data...
move_extent.c Loading commit data...
namei.c Loading commit data...
page-io.c Loading commit data...
readpage.c Loading commit data...
resize.c Loading commit data...
super.c Loading commit data...
symlink.c Loading commit data...
sysfs.c Loading commit data...
truncate.h Loading commit data...
xattr.c Loading commit data...
xattr.h Loading commit data...
xattr_security.c Loading commit data...
xattr_trusted.c Loading commit data...
xattr_user.c Loading commit data...