aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/extents.c5
-rw-r--r--fs/ext4/inode.c7
2 files changed, 5 insertions, 7 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index cfdc51e30257..a61873808f76 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4385,8 +4385,9 @@ out2:
4385 } 4385 }
4386 4386
4387out3: 4387out3:
4388 trace_ext4_ext_map_blocks_exit(inode, flags, map, err ? err : allocated); 4388 trace_ext4_ext_map_blocks_exit(inode, flags, map,
4389 4389 err ? err : allocated);
4390 ext4_es_lru_add(inode);
4390 return err ? err : allocated; 4391 return err ? err : allocated;
4391} 4392}
4392 4393
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 98b9bff92a8a..ba33c67d6e48 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -514,10 +514,9 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
514 "logical block %lu\n", inode->i_ino, flags, map->m_len, 514 "logical block %lu\n", inode->i_ino, flags, map->m_len,
515 (unsigned long) map->m_lblk); 515 (unsigned long) map->m_lblk);
516 516
517 ext4_es_lru_add(inode);
518
519 /* Lookup extent status tree firstly */ 517 /* Lookup extent status tree firstly */
520 if (ext4_es_lookup_extent(inode, map->m_lblk, &es)) { 518 if (ext4_es_lookup_extent(inode, map->m_lblk, &es)) {
519 ext4_es_lru_add(inode);
521 if (ext4_es_is_written(&es) || ext4_es_is_unwritten(&es)) { 520 if (ext4_es_is_written(&es) || ext4_es_is_unwritten(&es)) {
522 map->m_pblk = ext4_es_pblock(&es) + 521 map->m_pblk = ext4_es_pblock(&es) +
523 map->m_lblk - es.es_lblk; 522 map->m_lblk - es.es_lblk;
@@ -1529,11 +1528,9 @@ static int ext4_da_map_blocks(struct inode *inode, sector_t iblock,
1529 "logical block %lu\n", inode->i_ino, map->m_len, 1528 "logical block %lu\n", inode->i_ino, map->m_len,
1530 (unsigned long) map->m_lblk); 1529 (unsigned long) map->m_lblk);
1531 1530
1532 ext4_es_lru_add(inode);
1533
1534 /* Lookup extent status tree firstly */ 1531 /* Lookup extent status tree firstly */
1535 if (ext4_es_lookup_extent(inode, iblock, &es)) { 1532 if (ext4_es_lookup_extent(inode, iblock, &es)) {
1536 1533 ext4_es_lru_add(inode);
1537 if (ext4_es_is_hole(&es)) { 1534 if (ext4_es_is_hole(&es)) {
1538 retval = 0; 1535 retval = 0;
1539 down_read((&EXT4_I(inode)->i_data_sem)); 1536 down_read((&EXT4_I(inode)->i_data_sem));