diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-20 13:04:20 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:12:56 -0400 |
commit | 03d95eb2f2578083a3f6286262e1cb5d88a00c02 (patch) | |
tree | a82585b55080628e0ba0028dfb100886bf5b4099 /drivers/block/loop.c | |
parent | 72ec35163f9f728ba1579fd80682e51e933dfa8a (diff) |
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, | |||
230 | ssize_t bw; | 230 | ssize_t bw; |
231 | mm_segment_t old_fs = get_fs(); | 231 | mm_segment_t old_fs = get_fs(); |
232 | 232 | ||
233 | file_start_write(file); | ||
233 | set_fs(get_ds()); | 234 | set_fs(get_ds()); |
234 | bw = file->f_op->write(file, buf, len, &pos); | 235 | bw = file->f_op->write(file, buf, len, &pos); |
235 | set_fs(old_fs); | 236 | set_fs(old_fs); |
237 | file_end_write(file); | ||
236 | if (likely(bw == len)) | 238 | if (likely(bw == len)) |
237 | return 0; | 239 | return 0; |
238 | printk(KERN_ERR "loop: Write error at byte offset %llu, length %i.\n", | 240 | printk(KERN_ERR "loop: Write error at byte offset %llu, length %i.\n", |