projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb472ac
)
bcachefs: Trivial cleanup
author
Kent Overstreet
<kent.overstreet@gmail.com>
Wed, 25 Sep 2019 19:26:14 +0000
(15:26 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:27 +0000
(17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-io.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/fs-io.c
b/fs/bcachefs/fs-io.c
index e3f1d1dd06aedbb661c27a9d1ec8055b118ceab3..42c5719155e67f3ad235991f15a57a4ffe4841a2 100644
(file)
--- a/
fs/bcachefs/fs-io.c
+++ b/
fs/bcachefs/fs-io.c
@@
-830,11
+830,7
@@
vm_fault_t bch2_page_mkwrite(struct vm_fault *vmf)
goto out;
}
- /* page is wholly or partially inside EOF */
- if (((page->index + 1) << PAGE_SHIFT) <= isize)
- len = PAGE_SIZE;
- else
- len = offset_in_page(isize);
+ len = min_t(loff_t, PAGE_SIZE, isize - page_offset(page));
if (bch2_page_reservation_get(c, inode, page, &res, 0, len, true)) {
unlock_page(page);