kernel_optimize_test/fs
Matthew Bobrowski 3eaf9cc62f ext4: update ext4_sync_file() to not use __generic_file_fsync()
When the filesystem is created without a journal, we eventually call
into __generic_file_fsync() in order to write out all the modified
in-core data to the permanent storage device. This function happens to
try and obtain an inode_lock() while synchronizing the files buffer
and it's associated metadata.

Generally, this is fine, however it becomes a problem when there is
higher level code that has already obtained an inode_lock() as this
leads to a recursive lock situation. This case is especially true when
porting across direct I/O to iomap infrastructure as we obtain an
inode_lock() early on in the I/O within ext4_dio_write_iter() and hold
it until the I/O has been completed. Consequently, to not run into
this specific issue, we move away from calling into
__generic_file_fsync() and perform the necessary synchronization tasks
within ext4_sync_file().

Signed-off-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/3495f35ef67f2021b567e28e6f59222e583689b8.1572949325.git.mbobrowski@mbobrowski.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-11-05 11:31:40 -05:00
..
9p
adfs
affs
afs
autofs
befs
bfs
btrfs for-5.4-rc2-tag 2019-10-10 08:30:51 -07:00
cachefiles
ceph
cifs CIFS: Force reval dentry if LOOKUP_REVAL flag is set 2019-10-09 00:10:50 -05:00
coda
configfs
cramfs
crypto
debugfs
devpts
dlm
ecryptfs
efivarfs
efs
erofs
exportfs
ext2 iomap: use a srcmap for a read-modify-write I/O 2019-10-21 08:51:59 -07:00
ext4 ext4: update ext4_sync_file() to not use __generic_file_fsync() 2019-11-05 11:31:40 -05:00
f2fs
fat
freevxfs
fscache
fuse
gfs2 iomap: use a srcmap for a read-modify-write I/O 2019-10-21 08:51:59 -07:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs
iomap fs/iomap: remove redundant check in iomap_dio_rw() 2019-10-29 09:51:24 -07:00
isofs
jbd2 jbd2: Free journal head outside of locked region 2019-10-21 09:16:46 -04:00
jffs2
jfs
kernfs
lockd
minix
nfs NFSv4: Fix leak of clp->cl_acceptor string 2019-10-10 16:14:02 -04:00
nfs_common
nfsd
nilfs2
nls
notify
ntfs
ocfs2 jbd2: Make state lock a spinlock 2019-10-21 09:16:46 -04:00
omfs
openpromfs
orangefs
overlayfs
proc
pstore
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs tracing: Do not create tracefs files if tracefs lockdown is in effect 2019-10-12 20:49:07 -04:00
ubifs
udf
ufs
unicode
verity
xfs iomap: use a srcmap for a read-modify-write I/O 2019-10-21 08:51:59 -07:00
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c
buffer.c
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c
coredump.c
d_path.c
dax.c iomap: use a srcmap for a read-modify-write I/O 2019-10-21 08:51:59 -07:00
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c
fcntl.c
fhandle.c
file_table.c
file.c
filesystems.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fs-writeback.c writeback: fix use-after-free in finish_writeback_work() 2019-10-07 15:47:19 -07:00
fsopen.c
inode.c
internal.h
io_uring.c for-linus-20191012 2019-10-13 08:15:35 -07:00
ioctl.c
Kconfig
Kconfig.binfmt
libfs.c libfs: take cursors out of list when moving past the end of directory 2019-10-09 22:57:30 -04:00
locks.c
Makefile
mbcache.c
mount.h
mpage.c
namei.c
namespace.c
no-block.c
nsfs.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c uaccess: implement a proper unsafe_copy_to_user() and switch filldir over to it 2019-10-07 12:56:48 -07:00
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c Merge branch 'work.mount3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-10-10 08:16:44 -07:00
sync.c
timerfd.c
userfaultfd.c
utimes.c
xattr.c