diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-07-30 06:04:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 16:28:43 -0400 |
commit | 0a0898cf413876d4ed6e371f3e04bf38600a9205 (patch) | |
tree | 700c9e87bdd78392bd3fa11f2f976d360b8a5cd2 /fs/fuse/inode.c | |
parent | 685d16ddb07b74537fb18972784e6214840fdd20 (diff) |
[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>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index dcaaabd3b9c4..7d25092262ae 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -51,7 +51,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb) | |||
51 | return NULL; | 51 | return NULL; |
52 | 52 | ||
53 | fi = get_fuse_inode(inode); | 53 | fi = get_fuse_inode(inode); |
54 | fi->i_time = jiffies - 1; | 54 | fi->i_time = 0; |
55 | fi->nodeid = 0; | 55 | fi->nodeid = 0; |
56 | fi->nlookup = 0; | 56 | fi->nlookup = 0; |
57 | fi->forget_req = fuse_request_alloc(); | 57 | fi->forget_req = fuse_request_alloc(); |