提交 00251a16 编写于 作者: A Andreas Gruenbacher 提交者: Bob Peterson

gfs2: Minor clarification to __gfs2_punch_hole

Rename end_off to end_len to make the code less confusing.
Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: NBob Peterson <rpeterso@redhat.com>
上级 9e1a9ecd
......@@ -2154,11 +2154,11 @@ int __gfs2_punch_hole(struct file *file, loff_t offset, loff_t length)
if (error)
goto out;
} else {
unsigned int start_off, end_off, blocksize;
unsigned int start_off, end_len, blocksize;
blocksize = i_blocksize(inode);
start_off = offset & (blocksize - 1);
end_off = (offset + length) & (blocksize - 1);
end_len = (offset + length) & (blocksize - 1);
if (start_off) {
unsigned int len = length;
if (length > blocksize - start_off)
......@@ -2167,11 +2167,11 @@ int __gfs2_punch_hole(struct file *file, loff_t offset, loff_t length)
if (error)
goto out;
if (start_off + length < blocksize)
end_off = 0;
end_len = 0;
}
if (end_off) {
if (end_len) {
error = gfs2_block_zero_range(inode,
offset + length - end_off, end_off);
offset + length - end_len, end_len);
if (error)
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册