diff options
author | Zheng Liu <wenqing.lz@taobao.com> | 2013-02-18 09:27:26 +0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-02-18 09:27:26 +0400 |
commit | be401363ac5ec652c706263a59b0bd0acc3612e8 (patch) | |
tree | 64a7f85c2e1a0157a3ca740e4afc99260d8938c9 /fs/ext4/file.c | |
parent | fdc0212e86ca15c5cfed77088af7cc5eb79ccbc7 (diff) | |
download | linux-be401363ac5ec652c706263a59b0bd0acc3612e8.tar.xz |
ext4: rename and improbe ext4_es_find_extent()
This commit renames ext4_es_find_extent with ext4_es_find_delayed_extent
and improve this function. First, we split input and output parameter.
Second, this function never return the first block of the next delayed
extent after 'es'.
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Jan kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r-- | fs/ext4/file.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 2df9354b105e..7e85a10a6f4f 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -464,8 +464,7 @@ static loff_t ext4_seek_data(struct file *file, loff_t offset, loff_t maxsize) * If there is a delay extent at this offset, * it will be as a data. */ - es.es_lblk = last; - (void)ext4_es_find_extent(inode, &es); + ext4_es_find_delayed_extent(inode, last, &es); if (es.es_len != 0 && in_range(last, es.es_lblk, es.es_len)) { if (last != start) dataoff = last << blkbits; @@ -548,8 +547,7 @@ static loff_t ext4_seek_hole(struct file *file, loff_t offset, loff_t maxsize) * If there is a delay extent at this offset, * we will skip this extent. */ - es.es_lblk = last; - (void)ext4_es_find_extent(inode, &es); + ext4_es_find_delayed_extent(inode, last, &es); if (es.es_len != 0 && in_range(last, es.es_lblk, es.es_len)) { last = es.es_lblk + es.es_len; holeoff = last << blkbits; |