linux-kernel-test/drivers
Christoph Hellwig 4c728ef583 add a vfs_fsync helper
Fsync currently has a fdatawrite/fdatawait pair around the method call,
and a mutex_lock/unlock of the inode mutex.  All callers of fsync have
to duplicate this, but we have a few and most of them don't quite get
it right.  This patch adds a new vfs_fsync that takes care of this.
It's a little more complicated as usual as ->fsync might get a NULL file
pointer and just a dentry from nfsd, but otherwise gets afile and we
want to take the mapping and file operations from it when it is there.

Notes on the fsync callers:

 - ecryptfs wasn't calling filemap_fdatawrite / filemap_fdatawait on the
   	lower file
 - coda wasn't calling filemap_fdatawrite / filemap_fdatawait on the host
	file, and returning 0 when ->fsync was missing
 - shm wasn't calling either filemap_fdatawrite / filemap_fdatawait nor
   taking i_mutex.  Now given that shared memory doesn't have disk
   backing not doing anything in fsync seems fine and I left it out of
   the vfs_fsync conversion for now, but in that case we might just
   not pass it through to the lower file at all but just call the no-op
   simple_sync_file directly.

[and now actually export vfs_fsync]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-01-05 11:54:28 -05:00
..
accessibility
acpi cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t 2009-01-03 19:15:40 +01:00
amba
ata Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-12-30 17:43:10 -08:00
atm
auxdisplay
base Merge branch 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-03 12:04:39 -08:00
block Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 2008-12-30 17:37:25 -08:00
bluetooth
cdrom
char sparseirq: move set/get_timer_rand_state back to .c 2009-01-03 12:01:23 -08:00
clocksource Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-02 11:44:09 -08:00
connector
cpufreq
cpuidle
crypto
dca
dio
dma
edac
eisa
firewire
firmware
gpio
gpu
hid
hwmon
i2c Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-12-30 17:36:49 -08:00
ide ide-atapi: start dma in a drive-specific way 2009-01-02 16:12:56 +01:00
idle
ieee1394
infiniband zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
input Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-12-30 17:36:49 -08:00
isdn zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
leds
lguest Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask 2009-01-03 18:53:31 +01:00
macintosh
mca
md
media V4L/DVB (10173): Missing v4l2_prio_close in radio_release 2009-01-03 10:50:38 -02:00
memstick
message
mfd
misc zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
mmc Merge branch 'master' of ../mmc 2008-12-31 19:56:05 +01:00
mtd Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 2009-01-02 15:57:26 -08:00
net hso maintainers update patch 2009-01-02 10:19:43 -08:00
nubus
of
oprofile zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
parisc Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-02 11:44:09 -08:00
parport
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu 2009-01-03 12:03:52 -08:00
pcmcia
pnp percpu: fix percpu accessors to potentially !cpu_possible() cpus: pnpbios 2009-01-01 10:12:14 +10:30
power
ps3
rapidio
regulator
rtc Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-12-30 17:36:49 -08:00
s390 [PATCH] improve idle cputime accounting 2008-12-31 15:11:48 +01:00
sbus
scsi remove ide-scsi 2009-01-02 16:12:51 +01:00
serial serial_8250: support for Sealevel Systems Model 7803 COMM+8 2009-01-02 10:19:44 -08:00
sh
sn
spi
ssb
staging
tc
telephony
thermal
uio
usb add a vfs_fsync helper 2009-01-05 11:54:28 -05:00
uwb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream 2009-01-02 13:17:13 +00:00
video Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-12-30 17:36:49 -08:00
virtio virtio: add PCI device release() function 2008-12-30 09:26:10 +10:30
w1
watchdog [WATCHDOG] Add support for the WM8350 watchdog 2008-12-31 16:12:54 +00:00
xen Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-02 11:44:09 -08:00
zorro
Kconfig
Makefile