Commit 831e3f54 authored by Chuck Lever's avatar Chuck Lever
Browse files

Revert "sunrpc: clean cache_detail immediately when flush is written frequently"



Ondrej reports that certain SELinux tests are failing after commit
fc2a169c ("sunrpc: clean cache_detail immediately when flush is
written frequently"), merged during the v6.15 merge window.

Reported-by: default avatarOndrej Mosnacek <omosnace@redhat.com>
Fixes: fc2a169c ("sunrpc: clean cache_detail immediately when flush is written frequently")
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent a1d14d93
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -1536,13 +1536,9 @@ static ssize_t write_flush(struct file *file, const char __user *buf,
	 * or by one second if it has already reached the current time.
	 * Newly added cache entries will always have ->last_refresh greater
	 * that ->flush_time, so they don't get flushed prematurely.
	 *
	 * If someone frequently calls the flush interface, we should
	 * immediately clean the corresponding cache_detail instead of
	 * continuously accumulating nextcheck.
	 */

	if (cd->flush_time >= now && cd->flush_time < (now + 5))
	if (cd->flush_time >= now)
		now = cd->flush_time + 1;

	cd->flush_time = now;