]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: clean up xfs_end_ioend() to reuse local variables
authorLong Li <leo.lilong@huawei.com>
Mon, 9 Dec 2024 11:42:41 +0000 (19:42 +0800)
committerCarlos Maiolino <cem@kernel.org>
Thu, 9 Jan 2025 09:32:32 +0000 (10:32 +0100)
Use already initialized local variables 'offset' and 'size' instead
of accessing ioend members directly in xfs_setfilesize() call.

This is just a code cleanup with no functional changes.

Signed-off-by: Long Li <leo.lilong@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_aops.c

index 559a3a57709748f9293034ff5711ef656b6eabf1..67877c36ed11ae31282d69490b226fe4b6cc91c5 100644 (file)
@@ -131,7 +131,7 @@ xfs_end_ioend(
                error = xfs_iomap_write_unwritten(ip, offset, size, false);
 
        if (!error && xfs_ioend_is_append(ioend))
-               error = xfs_setfilesize(ip, ioend->io_offset, ioend->io_size);
+               error = xfs_setfilesize(ip, offset, size);
 done:
        iomap_finish_ioends(ioend, error);
        memalloc_nofs_restore(nofs_flag);