summaryrefslogtreecommitdiff
path: root/mm/mremap.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-11-05 13:37:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-11-06 13:30:34 -0700
commit61d0017e5a32d3b13ba3c7becc83a5a9e53cdbe9 (patch)
tree8a015db674968a9822edac1dcdf5cfaccbc753a5 /mm/mremap.c
parentefee17134ca464639a2f5b4d036ce40caf1b247a (diff)
mm: don't read i_size of inode unless we need it
We always go through i_size_read(), and we rarely end up needing it. Push the read to down where we need to check it, which avoids it for most cases. It looks like we can even remove this check entirely, which might be worth pursuing. But at least this takes it out of the hot path. Link: https://lkml.kernel.org/r/6b67981f-57d4-c80e-bc07-6020aa601381@kernel.dk Signed-off-by: Jens Axboe <axboe@kernel.dk> Acked-by: Chris Mason <clm@fb.com> Cc: Josef Bacik <josef@redhat.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Pavel Begunkov <asml.silence@gmail.com> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mremap.c')
0 files changed, 0 insertions, 0 deletions