From: Miklos Szeredi Date: Sun, 30 Jul 2006 10:04:08 +0000 (-0700) Subject: [PATCH] fuse: fix zero timeout X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=685d16ddb07b74537fb18972784e6214840fdd20;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [PATCH] fuse: fix zero timeout An attribute and entry timeout of zero should mean, that the entity is invalidated immediately after the operation. Previously invalidation only happened at the next clock tick. Reported and tested by Craig Davies. Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 72a74cde6de8..6db66ec386ae 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -25,8 +25,11 @@ */ static unsigned long time_to_jiffies(unsigned long sec, unsigned long nsec) { - struct timespec ts = {sec, nsec}; - return jiffies + timespec_to_jiffies(&ts); + if (sec || nsec) { + struct timespec ts = {sec, nsec}; + return jiffies + timespec_to_jiffies(&ts); + } else + return jiffies - 1; } /*