hostfs_kern.c (651a88798412e216f337d70181127e847f00a4b7) hostfs_kern.c (b7446e7cf15f0926866c8e5de90ab278998bf8c8)
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 *
5 * Ported the filesystem routines to 2.5.
6 * 2003-02-10 Petr Baudis <pasky@ucw.cz>
7 */
8

--- 454 unchanged lines hidden (view full) ---

463}
464
465static int hostfs_write_begin(struct file *file, struct address_space *mapping,
466 loff_t pos, unsigned len, unsigned flags,
467 struct page **pagep, void **fsdata)
468{
469 pgoff_t index = pos >> PAGE_SHIFT;
470
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 *
5 * Ported the filesystem routines to 2.5.
6 * 2003-02-10 Petr Baudis <pasky@ucw.cz>
7 */
8

--- 454 unchanged lines hidden (view full) ---

463}
464
465static int hostfs_write_begin(struct file *file, struct address_space *mapping,
466 loff_t pos, unsigned len, unsigned flags,
467 struct page **pagep, void **fsdata)
468{
469 pgoff_t index = pos >> PAGE_SHIFT;
470
471 *pagep = grab_cache_page_write_begin(mapping, index, flags);
471 *pagep = grab_cache_page_write_begin(mapping, index);
472 if (!*pagep)
473 return -ENOMEM;
474 return 0;
475}
476
477static int hostfs_write_end(struct file *file, struct address_space *mapping,
478 loff_t pos, unsigned len, unsigned copied,
479 struct page *page, void *fsdata)

--- 534 unchanged lines hidden ---
472 if (!*pagep)
473 return -ENOMEM;
474 return 0;
475}
476
477static int hostfs_write_end(struct file *file, struct address_space *mapping,
478 loff_t pos, unsigned len, unsigned copied,
479 struct page *page, void *fsdata)

--- 534 unchanged lines hidden ---