diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2018-06-18 16:34:59 +0100 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2018-06-21 07:40:00 -0500 |
commit | 00251a16d7f9eb380437b402def05cd7c1b16c09 (patch) | |
tree | e5613448b7baba4ac2f38a2e993901c1ec96b065 /fs/gfs2 | |
parent | 9e1a9ecd13b9bb421c88135b178577caf4d54f6a (diff) | |
download | op-kernel-dev-00251a16d7f9eb380437b402def05cd7c1b16c09.zip op-kernel-dev-00251a16d7f9eb380437b402def05cd7c1b16c09.tar.gz |
gfs2: Minor clarification to __gfs2_punch_hole
Rename end_off to end_len to make the code less confusing.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/bmap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index ed66997..c7287af 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -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; } |