]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
gfs2: Minor clarification to __gfs2_punch_hole
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 18 Jun 2018 15:34:59 +0000 (16:34 +0100)
committerBob Peterson <rpeterso@redhat.com>
Thu, 21 Jun 2018 12:40:00 +0000 (07:40 -0500)
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>
fs/gfs2/bmap.c

index ed6699705c13c5ca462be1f22cfb5dee7edec38f..c7287afeeef5b62f8bab01a1bcf09d96bd7f9cee 100644 (file)
@@ -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;
                }