mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
ext4: do not polute the extents cache while shifting extents
am: e0b53d6729
Change-Id: I31462a97e306c198855f17663b856e3e97867f97
This commit is contained in:
@@ -5344,7 +5344,8 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle,
|
||||
ext4_lblk_t stop, *iterator, ex_start, ex_end;
|
||||
|
||||
/* Let path point to the last extent */
|
||||
path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL, 0);
|
||||
path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL,
|
||||
EXT4_EX_NOCACHE);
|
||||
if (IS_ERR(path))
|
||||
return PTR_ERR(path);
|
||||
|
||||
@@ -5360,7 +5361,8 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle,
|
||||
* sure the hole is big enough to accommodate the shift.
|
||||
*/
|
||||
if (SHIFT == SHIFT_LEFT) {
|
||||
path = ext4_find_extent(inode, start - 1, &path, 0);
|
||||
path = ext4_find_extent(inode, start - 1, &path,
|
||||
EXT4_EX_NOCACHE);
|
||||
if (IS_ERR(path))
|
||||
return PTR_ERR(path);
|
||||
depth = path->p_depth;
|
||||
@@ -5398,7 +5400,8 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle,
|
||||
* becomes NULL to indicate the end of the loop.
|
||||
*/
|
||||
while (iterator && start <= stop) {
|
||||
path = ext4_find_extent(inode, *iterator, &path, 0);
|
||||
path = ext4_find_extent(inode, *iterator, &path,
|
||||
EXT4_EX_NOCACHE);
|
||||
if (IS_ERR(path))
|
||||
return PTR_ERR(path);
|
||||
depth = path->p_depth;
|
||||
|
||||
Reference in New Issue
Block a user