Unverified Commit 4a17bb62 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9596 iomap: fix warning in iomap_write_delalloc_release()

parents ed2d630b 91735df9
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1227,7 +1227,17 @@ static int iomap_write_delalloc_release(struct inode *inode,
			error = data_end;
			goto out_unlock;
		}
		WARN_ON_ONCE(data_end <= start_byte);

		/*
		 * Seek for data/hole in the page cache can race with drop
		 * cache, if data page was dropped between seek for data and
		 * hole, data_end may be equal to start_byte, just let it keep
		 * seeking.
		 */
		if (data_end == start_byte)
			continue;

		WARN_ON_ONCE(data_end < start_byte);
		WARN_ON_ONCE(data_end > scan_end_byte);

		error = iomap_write_delalloc_scan(inode, &punch_start_byte,