ext4: rename and split get blocks functions

Rename ext4_get_blocks_write() to ext4_get_blocks_unwritten() to better
describe what it does. Also split out get blocks functions for direct
IO. Later we move functionality from _ext4_get_blocks() there. There's no
functional change in this patch.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
Jan Kara
2016-03-08 23:08:10 -05:00
committed by Theodore Ts'o
parent e142d05263
commit 705965bd6d
4 changed files with 74 additions and 47 deletions

View File

@@ -581,9 +581,10 @@ retry:
if (ret)
goto out;
if (ext4_should_dioread_nolock(inode))
ret = __block_write_begin(page, from, to, ext4_get_block_write);
else
if (ext4_should_dioread_nolock(inode)) {
ret = __block_write_begin(page, from, to,
ext4_get_block_unwritten);
} else
ret = __block_write_begin(page, from, to, ext4_get_block);
if (!ret && ext4_should_journal_data(inode)) {