[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1G65QR-0002gm-00@dorka.pomaz.szeredi.hu>
Date: Thu, 27 Jul 2006 14:57:15 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: akpm@...l.org
CC: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH 1/5] 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 <miklos@...redi.hu>
---
Index: linux/fs/fuse/dir.c
===================================================================
--- linux.orig/fs/fuse/dir.c 2006-07-27 14:35:15.000000000 +0200
+++ linux/fs/fuse/dir.c 2006-07-27 14:37:59.000000000 +0200
@@ -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;
}
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists