|
@@ -219,7 +219,8 @@ static void release_existing_page_budget(struct ubifs_info *c)
|
|
}
|
|
}
|
|
|
|
|
|
static int write_begin_slow(struct address_space *mapping,
|
|
static int write_begin_slow(struct address_space *mapping,
|
|
- loff_t pos, unsigned len, struct page **pagep)
|
|
|
|
|
|
+ loff_t pos, unsigned len, struct page **pagep,
|
|
|
|
+ unsigned flags)
|
|
{
|
|
{
|
|
struct inode *inode = mapping->host;
|
|
struct inode *inode = mapping->host;
|
|
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
|
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
|
@@ -247,7 +248,7 @@ static int write_begin_slow(struct address_space *mapping,
|
|
if (unlikely(err))
|
|
if (unlikely(err))
|
|
return err;
|
|
return err;
|
|
|
|
|
|
- page = __grab_cache_page(mapping, index);
|
|
|
|
|
|
+ page = grab_cache_page_write_begin(mapping, index, flags);
|
|
if (unlikely(!page)) {
|
|
if (unlikely(!page)) {
|
|
ubifs_release_budget(c, &req);
|
|
ubifs_release_budget(c, &req);
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
@@ -438,7 +439,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
|
|
return -EROFS;
|
|
return -EROFS;
|
|
|
|
|
|
/* Try out the fast-path part first */
|
|
/* Try out the fast-path part first */
|
|
- page = __grab_cache_page(mapping, index);
|
|
|
|
|
|
+ page = grab_cache_page_write_begin(mapping, index, flags);
|
|
if (unlikely(!page))
|
|
if (unlikely(!page))
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
@@ -483,7 +484,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
|
|
unlock_page(page);
|
|
unlock_page(page);
|
|
page_cache_release(page);
|
|
page_cache_release(page);
|
|
|
|
|
|
- return write_begin_slow(mapping, pos, len, pagep);
|
|
|
|
|
|
+ return write_begin_slow(mapping, pos, len, pagep, flags);
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|