[PATCH] fuse: fix zero timeout
Changes
1 files changed · +5 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| fs/fuse/dir.c | modified | +5 | −2 | View file |
fs/fuse/dir.c
View filediff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 72a74cd..6db66ec 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;
}
/*