提交 98ae6ccd 编写于 作者: A Al Viro 提交者: Linus Torvalds

[PATCH] fix misannotations in loop.c

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 aa7677d4
...@@ -295,7 +295,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec, ...@@ -295,7 +295,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec,
* and do_lo_send_write(). * and do_lo_send_write().
*/ */
static int __do_lo_send_write(struct file *file, static int __do_lo_send_write(struct file *file,
u8 __user *buf, const int len, loff_t pos) u8 *buf, const int len, loff_t pos)
{ {
ssize_t bw; ssize_t bw;
mm_segment_t old_fs = get_fs(); mm_segment_t old_fs = get_fs();
...@@ -324,7 +324,7 @@ static int do_lo_send_direct_write(struct loop_device *lo, ...@@ -324,7 +324,7 @@ static int do_lo_send_direct_write(struct loop_device *lo,
struct bio_vec *bvec, int bsize, loff_t pos, struct page *page) struct bio_vec *bvec, int bsize, loff_t pos, struct page *page)
{ {
ssize_t bw = __do_lo_send_write(lo->lo_backing_file, ssize_t bw = __do_lo_send_write(lo->lo_backing_file,
(u8 __user *)kmap(bvec->bv_page) + bvec->bv_offset, kmap(bvec->bv_page) + bvec->bv_offset,
bvec->bv_len, pos); bvec->bv_len, pos);
kunmap(bvec->bv_page); kunmap(bvec->bv_page);
cond_resched(); cond_resched();
...@@ -351,7 +351,7 @@ static int do_lo_send_write(struct loop_device *lo, struct bio_vec *bvec, ...@@ -351,7 +351,7 @@ static int do_lo_send_write(struct loop_device *lo, struct bio_vec *bvec,
bvec->bv_offset, bvec->bv_len, pos >> 9); bvec->bv_offset, bvec->bv_len, pos >> 9);
if (likely(!ret)) if (likely(!ret))
return __do_lo_send_write(lo->lo_backing_file, return __do_lo_send_write(lo->lo_backing_file,
(u8 __user *)page_address(page), bvec->bv_len, page_address(page), bvec->bv_len,
pos); pos);
printk(KERN_ERR "loop: Transfer error at byte offset %llu, " printk(KERN_ERR "loop: Transfer error at byte offset %llu, "
"length %i.\n", (unsigned long long)pos, bvec->bv_len); "length %i.\n", (unsigned long long)pos, bvec->bv_len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册