file.c (20bb2479be49296ca324d7d9dfafad4816e7958c) file.c (d5097be55c21c103d2227591708425aab2e9682d)
1/*
2 * fs/f2fs/file.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

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

1413 up_write(&F2FS_I(inode)->dio_rwsem[WRITE]);
1414 return ret;
1415}
1416
1417static int expand_inode_data(struct inode *inode, loff_t offset,
1418 loff_t len, int mode)
1419{
1420 struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
1/*
2 * fs/f2fs/file.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

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

1413 up_write(&F2FS_I(inode)->dio_rwsem[WRITE]);
1414 return ret;
1415}
1416
1417static int expand_inode_data(struct inode *inode, loff_t offset,
1418 loff_t len, int mode)
1419{
1420 struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
1421 struct f2fs_map_blocks map = { .m_next_pgofs = NULL };
1421 struct f2fs_map_blocks map = { .m_next_pgofs = NULL,
1422 .m_seg_type = NO_CHECK_TYPE };
1422 pgoff_t pg_end;
1423 loff_t new_size = i_size_read(inode);
1424 loff_t off_end;
1425 int err;
1426
1427 err = inode_newsize_ok(inode, (len + offset));
1428 if (err)
1429 return err;

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

2061 return ret;
2062}
2063
2064static int f2fs_defragment_range(struct f2fs_sb_info *sbi,
2065 struct file *filp,
2066 struct f2fs_defragment *range)
2067{
2068 struct inode *inode = file_inode(filp);
1423 pgoff_t pg_end;
1424 loff_t new_size = i_size_read(inode);
1425 loff_t off_end;
1426 int err;
1427
1428 err = inode_newsize_ok(inode, (len + offset));
1429 if (err)
1430 return err;

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

2062 return ret;
2063}
2064
2065static int f2fs_defragment_range(struct f2fs_sb_info *sbi,
2066 struct file *filp,
2067 struct f2fs_defragment *range)
2068{
2069 struct inode *inode = file_inode(filp);
2069 struct f2fs_map_blocks map = { .m_next_pgofs = NULL };
2070 struct f2fs_map_blocks map = { .m_next_pgofs = NULL,
2071 .m_seg_type = NO_CHECK_TYPE };
2070 struct extent_info ei = {0,0,0};
2071 pgoff_t pg_start, pg_end;
2072 unsigned int blk_per_seg = sbi->blocks_per_seg;
2073 unsigned int total = 0, sec_num;
2074 block_t blk_end = 0;
2075 bool fragmented = false;
2076 int err;
2077

--- 738 unchanged lines hidden ---
2072 struct extent_info ei = {0,0,0};
2073 pgoff_t pg_start, pg_end;
2074 unsigned int blk_per_seg = sbi->blocks_per_seg;
2075 unsigned int total = 0, sec_num;
2076 block_t blk_end = 0;
2077 bool fragmented = false;
2078 int err;
2079

--- 738 unchanged lines hidden ---