mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 16:01:14 +07:00
[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 <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
25d7dfdaf3
commit
685d16ddb0
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user