xfs: kill meaningless variable 'zero'
authorEryu Guan <eguan@redhat.com>
Mon, 18 Sep 2017 18:38:58 +0000 (11:38 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 26 Sep 2017 01:22:30 +0000 (18:22 -0700)
In xfs_file_aio_write_checks(), variable 'zero' is there only to
satisfy xfs_zero_eof(), the result of it is ignored. Now, with
iomap_zero_range() based xfs_zero_eof(), we can safely pass NULL as
the last param of it and kill 'zero'.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_file.c

index ebdd0bd2b2616a7e9052b4da8378721b144dc0af..261d83f1db7672b3772b90c493bc77d9d150087a 100644 (file)
@@ -377,8 +377,6 @@ restart:
         */
        spin_lock(&ip->i_flags_lock);
        if (iocb->ki_pos > i_size_read(inode)) {
-               bool    zero = false;
-
                spin_unlock(&ip->i_flags_lock);
                if (!drained_dio) {
                        if (*iolock == XFS_IOLOCK_SHARED) {
@@ -399,7 +397,7 @@ restart:
                        drained_dio = true;
                        goto restart;
                }
-               error = xfs_zero_eof(ip, iocb->ki_pos, i_size_read(inode), &zero);
+               error = xfs_zero_eof(ip, iocb->ki_pos, i_size_read(inode), NULL);
                if (error)
                        return error;
        } else