ext4: check for shutdown and r/o file system in ext4_write_inode()
authorTheodore Ts'o <tytso@mit.edu>
Wed, 19 Dec 2018 19:36:58 +0000 (14:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:38:44 +0000 (17:38 +0100)
commit0cb4f6559087e99c14f129bc1332c40e84fd0559
tree884bdc9b62d870fbf5bf9a0ede14a0855934dbd3
parentbf2fd1f970405aeae0dc7cbf42d1ba82e7bf6b70
ext4: check for shutdown and r/o file system in ext4_write_inode()

commit 18f2c4fcebf2582f96cbd5f2238f4f354a0e4847 upstream.

If the file system has been shut down or is read-only, then
ext4_write_inode() needs to bail out early.

Also use jbd2_complete_transaction() instead of ext4_force_commit() so
we only force a commit if it is needed.

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