]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers
authorJosef Bacik <josef@redhat.com>
Sun, 17 Jul 2011 00:44:56 +0000 (20:44 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Jul 2011 00:47:59 +0000 (20:47 -0400)
commit02c24a82187d5a628c68edfe71ae60dc135cd178
treec8dbaba4d82e2b20ed4335910a564a1f7d90fcf6
parent22735068d53c7115e384bc88dea95b17e76a6839
fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers

Btrfs needs to be able to control how filemap_write_and_wait_range() is called
in fsync to make it less of a painful operation, so push down taking i_mutex and
the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
file systems can drop taking the i_mutex altogether it seems, like ext3 and
ocfs2.  For correctness sake I just pushed everything down in all cases to make
sure that we keep the current behavior the same for everybody, and then each
individual fs maintainer can make up their mind about what to do from there.
Thanks,

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
71 files changed:
Documentation/filesystems/Locking
Documentation/filesystems/porting
Documentation/filesystems/vfs.txt
arch/powerpc/platforms/cell/spufs/file.c
drivers/char/ps3flash.c
drivers/mtd/ubi/cdev.c
drivers/staging/pohmelfs/inode.c
drivers/usb/gadget/printer.c
drivers/video/fb_defio.c
fs/9p/v9fs_vfs.h
fs/9p/vfs_file.c
fs/affs/affs.h
fs/affs/file.c
fs/afs/internal.h
fs/afs/write.c
fs/bad_inode.c
fs/block_dev.c
fs/btrfs/ctree.h
fs/btrfs/file.c
fs/ceph/caps.c
fs/ceph/dir.c
fs/ceph/super.h
fs/cifs/cifsfs.h
fs/cifs/file.c
fs/coda/coda_int.h
fs/coda/file.c
fs/ecryptfs/file.c
fs/exofs/file.c
fs/ext2/ext2.h
fs/ext2/file.c
fs/ext3/fsync.c
fs/ext4/ext4.h
fs/ext4/fsync.c
fs/fat/fat.h
fs/fat/file.c
fs/fuse/dir.c
fs/fuse/file.c
fs/fuse/fuse_i.h
fs/gfs2/file.c
fs/hfs/inode.c
fs/hfsplus/hfsplus_fs.h
fs/hfsplus/inode.c
fs/hostfs/hostfs_kern.c
fs/hpfs/file.c
fs/hpfs/hpfs_fn.h
fs/hppfs/hppfs.c
fs/jffs2/file.c
fs/jffs2/os-linux.h
fs/jfs/file.c
fs/jfs/jfs_inode.h
fs/libfs.c
fs/logfs/file.c
fs/logfs/logfs.h
fs/ncpfs/file.c
fs/nfs/dir.c
fs/nfs/file.c
fs/nilfs2/file.c
fs/nilfs2/nilfs.h
fs/ntfs/dir.c
fs/ntfs/file.c
fs/ocfs2/file.c
fs/reiserfs/dir.c
fs/reiserfs/file.c
fs/sync.c
fs/ubifs/file.c
fs/ubifs/ubifs.h
fs/xfs/linux-2.6/xfs_file.c
include/linux/ext3_fs.h
include/linux/fb.h
include/linux/fs.h
ipc/shm.c