git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/home/rmk/linux-2.6-arm
[pandora-kernel.git]
/
fs
/
block_dev.c
diff --git
a/fs/block_dev.c
b/fs/block_dev.c
index
d11d028
..
6dcee88
100644
(file)
--- a/
fs/block_dev.c
+++ b/
fs/block_dev.c
@@
-404,20
+404,28
@@
static loff_t block_llseek(struct file *file, loff_t offset, int origin)
* NULL first argument is nfsd_sync_dir() and that's not a directory.
*/
* NULL first argument is nfsd_sync_dir() and that's not a directory.
*/
-
static int block
_fsync(struct file *filp, struct dentry *dentry, int datasync)
+
int blkdev
_fsync(struct file *filp, struct dentry *dentry, int datasync)
{
{
- struct block_device *bdev = I_BDEV(filp->f_mapping->host);
+ struct inode *bd_inode = filp->f_mapping->host;
+ struct block_device *bdev = I_BDEV(bd_inode);
int error;
int error;
- error = sync_blockdev(bdev);
- if (error)
- return error;
-
+ /*
+ * There is no need to serialise calls to blkdev_issue_flush with
+ * i_mutex and doing so causes performance issues with concurrent
+ * O_SYNC writers to a block device.
+ */
+ mutex_unlock(&bd_inode->i_mutex);
+
error = blkdev_issue_flush(bdev, NULL);
if (error == -EOPNOTSUPP)
error = 0;
error = blkdev_issue_flush(bdev, NULL);
if (error == -EOPNOTSUPP)
error = 0;
+
+ mutex_lock(&bd_inode->i_mutex);
+
return error;
}
return error;
}
+EXPORT_SYMBOL(blkdev_fsync);
/*
* pseudo-fs
/*
* pseudo-fs
@@
-1481,7
+1489,7
@@
const struct file_operations def_blk_fops = {
.aio_read = generic_file_aio_read,
.aio_write = blkdev_aio_write,
.mmap = generic_file_mmap,
.aio_read = generic_file_aio_read,
.aio_write = blkdev_aio_write,
.mmap = generic_file_mmap,
- .fsync = bl
ock
_fsync,
+ .fsync = bl
kdev
_fsync,
.unlocked_ioctl = block_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = compat_blkdev_ioctl,
.unlocked_ioctl = block_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = compat_blkdev_ioctl,