commit | 151a31b25e5c941bdd9fdefed650effca223c716 | [log] [tgz] |
---|---|---|
author | Li Zefan <lizf@cn.fujitsu.com> | Fri Sep 02 15:56:39 2011 +0800 |
committer | David Sterba <dsterba@suse.cz> | Thu Oct 20 18:10:35 2011 +0200 |
tree | 60c0888c247601fad2b550885c5b430f1fbf02e0 | |
parent | cbcc83265d929ac71553c1b5dafdb830171af947 [diff] |
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: Li Zefan <lizf@cn.fujitsu.com>