summaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-06-29 12:54:28 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-06-29 12:54:28 -0400
commite29136f80e775b0310273932b4297a62f5574a29 (patch)
treed10d56b15b7968744ea0becdf61440aae7e609c5 /fs/ext4/inode.c
parentc67d859e39896e4286249da89c4ca0ef8bd949cb (diff)
downloadop-kernel-dev-e29136f80e775b0310273932b4297a62f5574a29.zip
op-kernel-dev-e29136f80e775b0310273932b4297a62f5574a29.tar.gz
ext4: Enhance ext4_grp_locked_error() to take block and function numbers
Also use a macro definition so that __func__ and __LINE__ is implicit. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index b485987..64baadb 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1128,8 +1128,8 @@ void ext4_da_update_reserve_space(struct inode *inode,
ext4_discard_preallocations(inode);
}
-static int check_block_validity(struct inode *inode, const char *func,
- struct ext4_map_blocks *map)
+static int __check_block_validity(struct inode *inode, const char *func,
+ struct ext4_map_blocks *map)
{
if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), map->m_pblk,
map->m_len)) {
@@ -1142,6 +1142,9 @@ static int check_block_validity(struct inode *inode, const char *func,
return 0;
}
+#define check_block_validity(inode, map) \
+ __check_block_validity((inode), __func__, (map))
+
/*
* Return the number of contiguous dirty pages in a given inode
* starting at page frame idx.
@@ -1244,7 +1247,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
up_read((&EXT4_I(inode)->i_data_sem));
if (retval > 0 && map->m_flags & EXT4_MAP_MAPPED) {
- int ret = check_block_validity(inode, __func__, map);
+ int ret = check_block_validity(inode, map);
if (ret != 0)
return ret;
}
@@ -1324,9 +1327,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
up_write((&EXT4_I(inode)->i_data_sem));
if (retval > 0 && map->m_flags & EXT4_MAP_MAPPED) {
- int ret = check_block_validity(inode,
- "ext4_map_blocks_after_alloc",
- map);
+ int ret = check_block_validity(inode, map);
if (ret != 0)
return ret;
}
OpenPOWER on IntegriCloud