X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=mm%2Ffilemap_xip.c;h=1888b2d71bb8d78a1a17ec408d1865a7919e76ea;hb=dc83d6e27fa80babe31c80aa8568f125f72edf57;hp=0c04615651b7e8b412e85cdeee26365ddee7515c;hpb=edc315fd222497ae4f4b959a9e31ada1e68a4755;p=safe%2Fjmp%2Flinux-2.6 diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c index 0c04615..1888b2d 100644 --- a/mm/filemap_xip.c +++ b/mm/filemap_xip.c @@ -89,8 +89,8 @@ do_xip_mapping_read(struct address_space *mapping, } } nr = nr - offset; - if (nr > len) - nr = len; + if (nr > len - copied) + nr = len - copied; error = mapping->a_ops->get_xip_mem(mapping, index, 0, &xip_mem, &xip_pfn); @@ -296,7 +296,7 @@ out: } } -static struct vm_operations_struct xip_file_vm_ops = { +static const struct vm_operations_struct xip_file_vm_ops = { .fault = xip_file_fault, };