aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-05-12 00:21:29 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-05-12 00:21:29 -0400
commitf888e652d758bfe0c04c209b72a05972daeba386 (patch)
tree5d593d7ce0f4e58cf2c049b8635e55f3b5a0d415 /fs/ext4
parentbc8e67409ccdcff72c3f1656b1fb1aad7ff396db (diff)
ext4: Simplify function signature for ext4_da_get_block_write()
The function ext4_da_get_block_write() is called in exactly one write, and the last argument, create, is always 1. Remove it to simplify the code slightly. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 4e7f363e303..476d843610a 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2000,7 +2000,7 @@ static void ext4_print_free_blocks(struct inode *inode)
2000 2000
2001#define EXT4_DELALLOC_RSVED 1 2001#define EXT4_DELALLOC_RSVED 1
2002static int ext4_da_get_block_write(struct inode *inode, sector_t iblock, 2002static int ext4_da_get_block_write(struct inode *inode, sector_t iblock,
2003 struct buffer_head *bh_result, int create) 2003 struct buffer_head *bh_result)
2004{ 2004{
2005 int ret; 2005 int ret;
2006 unsigned max_blocks = bh_result->b_size >> inode->i_blkbits; 2006 unsigned max_blocks = bh_result->b_size >> inode->i_blkbits;
@@ -2010,7 +2010,7 @@ static int ext4_da_get_block_write(struct inode *inode, sector_t iblock,
2010 handle = ext4_journal_current_handle(); 2010 handle = ext4_journal_current_handle();
2011 BUG_ON(!handle); 2011 BUG_ON(!handle);
2012 ret = ext4_get_blocks_wrap(handle, inode, iblock, max_blocks, 2012 ret = ext4_get_blocks_wrap(handle, inode, iblock, max_blocks,
2013 bh_result, create, 0, EXT4_DELALLOC_RSVED); 2013 bh_result, 1, 0, EXT4_DELALLOC_RSVED);
2014 if (ret <= 0) 2014 if (ret <= 0)
2015 return ret; 2015 return ret;
2016 2016
@@ -2088,7 +2088,7 @@ static int mpage_da_map_blocks(struct mpage_da_data *mpd)
2088 if (!new.b_size) 2088 if (!new.b_size)
2089 return 0; 2089 return 0;
2090 2090
2091 err = ext4_da_get_block_write(mpd->inode, next, &new, 1); 2091 err = ext4_da_get_block_write(mpd->inode, next, &new);
2092 if (err) { 2092 if (err) {
2093 /* 2093 /*
2094 * If get block returns with error we simply 2094 * If get block returns with error we simply