inline.c (0414b004a894746921bbc05f05dced1e7907b092) inline.c (300e129c15f0ed2f94482900a4cb65b28eb09d94)
1/*
2 * fs/f2fs/inline.c
3 * Copyright (c) 2013, Intel Corporation
4 * Authors: Huajun Li <huajun.li@intel.com>
5 * Haicheng Li <haicheng.li@intel.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

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

156 struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
157 struct dnode_of_data dn;
158 struct page *ipage, *page;
159 int err = 0;
160
161 if (!f2fs_has_inline_data(inode))
162 return 0;
163
1/*
2 * fs/f2fs/inline.c
3 * Copyright (c) 2013, Intel Corporation
4 * Authors: Huajun Li <huajun.li@intel.com>
5 * Haicheng Li <haicheng.li@intel.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

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

156 struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
157 struct dnode_of_data dn;
158 struct page *ipage, *page;
159 int err = 0;
160
161 if (!f2fs_has_inline_data(inode))
162 return 0;
163
164 page = grab_cache_page(inode->i_mapping, 0);
164 page = f2fs_grab_cache_page(inode->i_mapping, 0, false);
165 if (!page)
166 return -ENOMEM;
167
168 f2fs_lock_op(sbi);
169
170 ipage = get_node_page(sbi, inode->i_ino);
171 if (IS_ERR(ipage)) {
172 err = PTR_ERR(ipage);

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

353static int f2fs_move_inline_dirents(struct inode *dir, struct page *ipage,
354 struct f2fs_inline_dentry *inline_dentry)
355{
356 struct page *page;
357 struct dnode_of_data dn;
358 struct f2fs_dentry_block *dentry_blk;
359 int err;
360
165 if (!page)
166 return -ENOMEM;
167
168 f2fs_lock_op(sbi);
169
170 ipage = get_node_page(sbi, inode->i_ino);
171 if (IS_ERR(ipage)) {
172 err = PTR_ERR(ipage);

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

353static int f2fs_move_inline_dirents(struct inode *dir, struct page *ipage,
354 struct f2fs_inline_dentry *inline_dentry)
355{
356 struct page *page;
357 struct dnode_of_data dn;
358 struct f2fs_dentry_block *dentry_blk;
359 int err;
360
361 page = grab_cache_page(dir->i_mapping, 0);
361 page = f2fs_grab_cache_page(dir->i_mapping, 0, false);
362 if (!page) {
363 f2fs_put_page(ipage, 1);
364 return -ENOMEM;
365 }
366
367 set_new_dnode(&dn, dir, ipage, NULL, 0);
368 err = f2fs_reserve_block(&dn, 0);
369 if (err)

--- 317 unchanged lines hidden ---
362 if (!page) {
363 f2fs_put_page(ipage, 1);
364 return -ENOMEM;
365 }
366
367 set_new_dnode(&dn, dir, ipage, NULL, 0);
368 err = f2fs_reserve_block(&dn, 0);
369 if (err)

--- 317 unchanged lines hidden ---