Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467432 > unrolled thread

[PATCH] CacheFiles: remove the check of fstop and bstop

Started byShawn Lin <shawn.lin@rock-chips.com>
First post2016-08-22 10:00 +0200
Last post2016-08-22 10:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] CacheFiles: remove the check of fstop and bstop Shawn Lin <shawn.lin@rock-chips.com> - 2016-08-22 10:00 +0200

#1467432 — [PATCH] CacheFiles: remove the check of fstop and bstop

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-08-22 10:00 +0200
Subject[PATCH] CacheFiles: remove the check of fstop and bstop
Message-ID<s8Sjg-3ra-17@gated-at.bofh.it>
No need to compare them with zero as it should
never be less than zero.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 fs/cachefiles/daemon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
index 1ee54ff..2ee88bd 100644
--- a/fs/cachefiles/daemon.c
+++ b/fs/cachefiles/daemon.c
@@ -386,7 +386,7 @@ static int cachefiles_daemon_fstop(struct cachefiles_cache *cache, char *args)
 	if (args[0] != '%' || args[1] != '\0')
 		return -EINVAL;
 
-	if (fstop < 0 || fstop >= cache->fcull_percent)
+	if (fstop >= cache->fcull_percent)
 		return cachefiles_daemon_range_error(cache, args);
 
 	cache->fstop_percent = fstop;
@@ -458,7 +458,7 @@ static int cachefiles_daemon_bstop(struct cachefiles_cache *cache, char *args)
 	if (args[0] != '%' || args[1] != '\0')
 		return -EINVAL;
 
-	if (bstop < 0 || bstop >= cache->bcull_percent)
+	if (bstop >= cache->bcull_percent)
 		return cachefiles_daemon_range_error(cache, args);
 
 	cache->bstop_percent = bstop;
-- 
2.3.7

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web