summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-20 18:04:20 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 20:12:56 +0200
commit03d95eb2f2578083a3f6286262e1cb5d88a00c02 (patch)
treea82585b55080628e0ba0028dfb100886bf5b4099 /drivers
parentswitch compat readv/writev variants to COMPAT_SYSCALL_DEFINE (diff)
downloadlinux-03d95eb2f2578083a3f6286262e1cb5d88a00c02.tar.xz
linux-03d95eb2f2578083a3f6286262e1cb5d88a00c02.zip
lift sb_start_write() out of ->write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/loop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 747bb2af69dc..cd1e17460f03 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -230,9 +230,11 @@ static int __do_lo_send_write(struct file *file,
ssize_t bw;
mm_segment_t old_fs = get_fs();
+ file_start_write(file);
set_fs(get_ds());
bw = file->f_op->write(file, buf, len, &pos);
set_fs(old_fs);
+ file_end_write(file);
if (likely(bw == len))
return 0;
printk(KERN_ERR "loop: Write error at byte offset %llu, length %i.\n",