Hello.

Am I reading the code the wrong way, or is the 'last_index' variable in 
'__btrfs_buffered_write()' (and previously used in 'btrfs_file_aio_write()') 
irrelevant? 

It appears to just be used in 'prepare_pages()', passed as an argument, but 
never actually used by this function.

Furthermore, I'm not sure what is intended with this variable, but if the idea 
is to assign it with the  last page in the range, then I would say that instead 
of

> last_index = (pos + iov_iter_count(i)) >> PAGE_CACHE_SHIFT;

it should be

>  last_index = (pos + iov_iter_count(i) - 1) >> PAGE_CACHE_SHIFT;

Then again, I may be missing something.

Cheers.

---
João Eduardo Luís
gpg key: 477C26E5 from pool.keyserver.eu 





Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to