Re: [RFC PATCH 2/8] brd: use memcpy_from_page() in copy_from_brd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> @@ -236,11 +235,9 @@ static void copy_from_brd(void *dst, struct brd_device *brd,
>>  		sector += copy >> SECTOR_SHIFT;
>>  		copy = n - copy;
>>  		page = brd_lookup_page(brd, sector);
>> -		if (page) {
>> -			src = kmap_atomic(page);
>> -			memcpy(dst, src, copy);
>> -			kunmap_atomic(src);
>> -		} else
>> +		if (page)
>> +			memcpy_from_page(dst, page, offset, copy);
> Why 'offset'?
Will fix it in the V1.
> Ira
>
>> +		else
>>  			memset(dst, 0, copy);
>>  	}
>>  }
>> -- 
>> 2.22.1
>>





[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux