Commit d55460bb authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Trivial cleanup

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent fb472ac5
...@@ -830,11 +830,7 @@ vm_fault_t bch2_page_mkwrite(struct vm_fault *vmf) ...@@ -830,11 +830,7 @@ vm_fault_t bch2_page_mkwrite(struct vm_fault *vmf)
goto out; goto out;
} }
/* page is wholly or partially inside EOF */ len = min_t(loff_t, PAGE_SIZE, isize - page_offset(page));
if (((page->index + 1) << PAGE_SHIFT) <= isize)
len = PAGE_SIZE;
else
len = offset_in_page(isize);
if (bch2_page_reservation_get(c, inode, page, &res, 0, len, true)) { if (bch2_page_reservation_get(c, inode, page, &res, 0, len, true)) {
unlock_page(page); unlock_page(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment