diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-20 21:04:20 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 22:12:56 +0400 |
commit | 03d95eb2f2578083a3f6286262e1cb5d88a00c02 (patch) | |
tree | a82585b55080628e0ba0028dfb100886bf5b4099 /drivers/block/loop.c | |
parent | 72ec35163f9f728ba1579fd80682e51e933dfa8a (diff) | |
download | linux-03d95eb2f2578083a3f6286262e1cb5d88a00c02.tar.xz |
lift sb_start_write() out of ->write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r-- | drivers/block/loop.c | 2 |
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", |