summaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorAshish Sangwan <a.sangwan@samsung.com>2013-07-01 14:12:38 +0200
committerTheodore Ts'o <tytso@mit.edu>2013-07-01 14:12:38 +0200
commitaeb2817a4ea99f62532adf3377be3b282d3bda12 (patch)
tree7e51c67923215eb8e6596d2052d2b8ad261c1b3c /fs/ext4/inode.c
parentext4: improve free space calculation for inline_data (diff)
downloadlinux-aeb2817a4ea99f62532adf3377be3b282d3bda12.tar.xz
linux-aeb2817a4ea99f62532adf3377be3b282d3bda12.zip
ext4: pass inode pointer instead of file pointer to punch hole
No need to pass file pointer when we can directly pass inode pointer. Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to '')
-rw-r--r--fs/ext4/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index f9ba51f68777..753c15683809 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3481,9 +3481,8 @@ int ext4_can_truncate(struct inode *inode)
* Returns: 0 on success or negative on failure
*/
-int ext4_punch_hole(struct file *file, loff_t offset, loff_t length)
+int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
{
- struct inode *inode = file_inode(file);
struct super_block *sb = inode->i_sb;
ext4_lblk_t first_block, stop_block;
struct address_space *mapping = inode->i_mapping;