diff options
Diffstat (limited to 'fs/hugetlbfs/inode.c')
-rw-r--r-- | fs/hugetlbfs/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index e1f465a389d5..4ea71eba40a5 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -213,12 +213,12 @@ hugetlbfs_read_actor(struct page *page, unsigned long offset, | |||
213 | int i, chunksize; | 213 | int i, chunksize; |
214 | 214 | ||
215 | /* Find which 4k chunk and offset with in that chunk */ | 215 | /* Find which 4k chunk and offset with in that chunk */ |
216 | i = offset >> PAGE_CACHE_SHIFT; | 216 | i = offset >> PAGE_SHIFT; |
217 | offset = offset & ~PAGE_CACHE_MASK; | 217 | offset = offset & ~PAGE_MASK; |
218 | 218 | ||
219 | while (size) { | 219 | while (size) { |
220 | size_t n; | 220 | size_t n; |
221 | chunksize = PAGE_CACHE_SIZE; | 221 | chunksize = PAGE_SIZE; |
222 | if (offset) | 222 | if (offset) |
223 | chunksize -= offset; | 223 | chunksize -= offset; |
224 | if (chunksize > size) | 224 | if (chunksize > size) |
@@ -237,7 +237,7 @@ hugetlbfs_read_actor(struct page *page, unsigned long offset, | |||
237 | /* | 237 | /* |
238 | * Support for read() - Find the page attached to f_mapping and copy out the | 238 | * Support for read() - Find the page attached to f_mapping and copy out the |
239 | * data. Its *very* similar to do_generic_mapping_read(), we can't use that | 239 | * data. Its *very* similar to do_generic_mapping_read(), we can't use that |
240 | * since it has PAGE_CACHE_SIZE assumptions. | 240 | * since it has PAGE_SIZE assumptions. |
241 | */ | 241 | */ |
242 | static ssize_t hugetlbfs_read_iter(struct kiocb *iocb, struct iov_iter *to) | 242 | static ssize_t hugetlbfs_read_iter(struct kiocb *iocb, struct iov_iter *to) |
243 | { | 243 | { |
@@ -285,7 +285,7 @@ static ssize_t hugetlbfs_read_iter(struct kiocb *iocb, struct iov_iter *to) | |||
285 | * We have the page, copy it to user space buffer. | 285 | * We have the page, copy it to user space buffer. |
286 | */ | 286 | */ |
287 | copied = hugetlbfs_read_actor(page, offset, to, nr); | 287 | copied = hugetlbfs_read_actor(page, offset, to, nr); |
288 | page_cache_release(page); | 288 | put_page(page); |
289 | } | 289 | } |
290 | offset += copied; | 290 | offset += copied; |
291 | retval += copied; | 291 | retval += copied; |