[PATCH] fuse: use jiffies_64
It is entirely possible (though rare) that jiffies half-wraps around, while a dentry/inode remains in the cache. This could mean that the dentry/inode is not invalidated for another half wraparound-time. To get around this problem, use 64-bit jiffies. The only problem with this is that dentry->d_time is 32 bits on 32-bit archs. So use d_fsdata as the high 32 bits. This is an ugly hack, but far simpler, than having to allocate private data just for this purpose. Since 64-bit jiffies can be assumed never to wrap around, simple comparison can be used, and a zero time value can represent "invalid". 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:

committed by
Linus Torvalds

parent
685d16ddb0
commit
0a0898cf41
@@ -51,7 +51,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
|
||||
return NULL;
|
||||
|
||||
fi = get_fuse_inode(inode);
|
||||
fi->i_time = jiffies - 1;
|
||||
fi->i_time = 0;
|
||||
fi->nodeid = 0;
|
||||
fi->nlookup = 0;
|
||||
fi->forget_req = fuse_request_alloc();
|
||||
|
Reference in New Issue
Block a user