* [PATCH] fs: cachefiles: remove useless code
@ 2014-11-01 13:01 Sudip Mukherjee
0 siblings, 0 replies; only message in thread
From: Sudip Mukherjee @ 2014-11-01 13:01 UTC (permalink / raw)
To: David Howells; +Cc: Sudip Mukherjee, linux-cachefs, linux-kernel
removed a comparison of unsigned long integer to less than zero,
which will be always false.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
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 ce1b115..e5ee49f 100644
--- a/fs/cachefiles/daemon.c
+++ b/fs/cachefiles/daemon.c
@@ -385,7 +385,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;
@@ -457,7 +457,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;
--
1.8.1.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-01 13:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-01 13:01 [PATCH] fs: cachefiles: remove useless code Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®