Skip to content
Commit 151a31b2 authored by Li Zefan's avatar Li Zefan Committed by David Sterba
Browse files

Btrfs: use i_size_read() in btrfs_defrag_file()



Don't use inode->i_size directly, since we're not holding i_mutex.

This also fixes another bug, that i_size can change after it's checked
against 0 and then (i_size - 1) can be negative.

Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
parent cbcc8326
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment