|
@@ -514,10 +514,9 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
|
|
|
"logical block %lu\n", inode->i_ino, flags, map->m_len,
|
|
|
(unsigned long) map->m_lblk);
|
|
|
|
|
|
- ext4_es_lru_add(inode);
|
|
|
-
|
|
|
/* Lookup extent status tree firstly */
|
|
|
if (ext4_es_lookup_extent(inode, map->m_lblk, &es)) {
|
|
|
+ ext4_es_lru_add(inode);
|
|
|
if (ext4_es_is_written(&es) || ext4_es_is_unwritten(&es)) {
|
|
|
map->m_pblk = ext4_es_pblock(&es) +
|
|
|
map->m_lblk - es.es_lblk;
|
|
@@ -1529,11 +1528,9 @@ static int ext4_da_map_blocks(struct inode *inode, sector_t iblock,
|
|
|
"logical block %lu\n", inode->i_ino, map->m_len,
|
|
|
(unsigned long) map->m_lblk);
|
|
|
|
|
|
- ext4_es_lru_add(inode);
|
|
|
-
|
|
|
/* Lookup extent status tree firstly */
|
|
|
if (ext4_es_lookup_extent(inode, iblock, &es)) {
|
|
|
-
|
|
|
+ ext4_es_lru_add(inode);
|
|
|
if (ext4_es_is_hole(&es)) {
|
|
|
retval = 0;
|
|
|
down_read((&EXT4_I(inode)->i_data_sem));
|