diff options
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 6b455c2b3f03..23f029359688 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -607,7 +607,8 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf, | |||
607 | 607 | ||
608 | while(count > 0) { | 608 | while(count > 0) { |
609 | size_t offset = pos & (PAGE_CACHE_SIZE - 1); | 609 | size_t offset = pos & (PAGE_CACHE_SIZE - 1); |
610 | size_t write_bytes = min(count, nrptrs * PAGE_CACHE_SIZE - | 610 | size_t write_bytes = min(count, nrptrs * |
611 | (size_t)PAGE_CACHE_SIZE - | ||
611 | offset); | 612 | offset); |
612 | size_t num_pages = (write_bytes + PAGE_CACHE_SIZE - 1) >> | 613 | size_t num_pages = (write_bytes + PAGE_CACHE_SIZE - 1) >> |
613 | PAGE_CACHE_SHIFT; | 614 | PAGE_CACHE_SHIFT; |