]> git.itanic.dy.fi Git - linux-stable/commit
ext4: force inode writes when nfsd calls commit_metadata()
authorTheodore Ts'o <tytso@mit.edu>
Wed, 19 Dec 2018 19:07:58 +0000 (14:07 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:14:49 +0000 (17:14 +0100)
commitdbffc914157c45a3d2157aa09deb9307c9e2b078
tree333375a524bacba3fa57d1fbe1bcfe2e43a3eec5
parent6ef63893e78fd20aeb12257cf3259fc50c86f7da
ext4: force inode writes when nfsd calls commit_metadata()

commit fde872682e175743e0c3ef939c89e3c6008a1529 upstream.

Some time back, nfsd switched from calling vfs_fsync() to using a new
commit_metadata() hook in export_operations().  If the file system did
not provide a commit_metadata() hook, it fell back to using
sync_inode_metadata().  Unfortunately doesn't work on all file
systems.  In particular, it doesn't work on ext4 due to how the inode
gets journalled --- the VFS writeback code will not always call
ext4_write_inode().

So we need to provide our own ext4_nfs_commit_metdata() method which
calls ext4_write_inode() directly.

Google-Bug-Id: 121195940
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/super.c
include/trace/events/ext4.h