diff options
author | Eryu Guan <eguan@redhat.com> | 2017-09-18 14:38:58 -0400 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-09-25 21:22:30 -0400 |
commit | 64671bafbdd984535aa382bccadd91fbe7be0e80 (patch) | |
tree | 1abb1c2b61dbd13e4877463136e92a3843d3b0c0 | |
parent | e150dcd459e1b441eaf08f341a986f04e61bf3b8 (diff) |
xfs: kill meaningless variable 'zero'
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>
-rw-r--r-- | fs/xfs/xfs_file.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index ebdd0bd2b261..261d83f1db76 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c | |||
@@ -377,8 +377,6 @@ restart: | |||
377 | */ | 377 | */ |
378 | spin_lock(&ip->i_flags_lock); | 378 | spin_lock(&ip->i_flags_lock); |
379 | if (iocb->ki_pos > i_size_read(inode)) { | 379 | if (iocb->ki_pos > i_size_read(inode)) { |
380 | bool zero = false; | ||
381 | |||
382 | spin_unlock(&ip->i_flags_lock); | 380 | spin_unlock(&ip->i_flags_lock); |
383 | if (!drained_dio) { | 381 | if (!drained_dio) { |
384 | if (*iolock == XFS_IOLOCK_SHARED) { | 382 | if (*iolock == XFS_IOLOCK_SHARED) { |
@@ -399,7 +397,7 @@ restart: | |||
399 | drained_dio = true; | 397 | drained_dio = true; |
400 | goto restart; | 398 | goto restart; |
401 | } | 399 | } |
402 | error = xfs_zero_eof(ip, iocb->ki_pos, i_size_read(inode), &zero); | 400 | error = xfs_zero_eof(ip, iocb->ki_pos, i_size_read(inode), NULL); |
403 | if (error) | 401 | if (error) |
404 | return error; | 402 | return error; |
405 | } else | 403 | } else |