ext4: use ext4_write_inode() when fsyncing w/o a journal
authorTheodore Ts'o <tytso@mit.edu>
Mon, 31 Dec 2018 05:10:48 +0000 (00:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2019 21:07:13 +0000 (22:07 +0100)
commit82f71b8bc05c6866b7dfae96ebca5ee102f76afa
treea394e3669581460cc0a84be3042de3c7d96d3ca5
parentb17971aeaf144ec627b0516ecc990c0a3fd278fe
ext4: use ext4_write_inode() when fsyncing w/o a journal

commit ad211f3e94b314a910d4af03178a0b52a7d1ee0a upstream.

In no-journal mode, we previously used __generic_file_fsync() in
no-journal mode.  This triggers a lockdep warning, and in addition,
it's not safe to depend on the inode writeback mechanism in the case
ext4.  We can solve both problems by calling ext4_write_inode()
directly.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/fsync.c