From d7bf78d9131bbe44800d0e961eaf3881925d1219 Mon Sep 17 00:00:00 2001 From: Madan Valluri Date: Mon, 4 Feb 2013 18:30:14 +0100 Subject: libfuse: fix the 'remember' option The lru list was not initialized for the "/" path. This resulted in remove_node_lru() crashing on LOOKUP-DOTDOT. Patch by Madan Valluri. -- ChangeLog | 4 ++++ lib/fuse.c | 4 ++++ 2 files changed, 8 insertions(+) --- lib/fuse.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/fuse.c') diff --git a/lib/fuse.c b/lib/fuse.c index 1917346..f404650 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -4698,6 +4698,10 @@ struct fuse *fuse_new_common(struct fuse_chan *ch, struct fuse_args *args, fprintf(stderr, "fuse: memory allocation failed\n"); goto out_free_id_table; } + if (lru_enabled(f)) { + struct node_lru *lnode = node_lru(root); + init_list_head(&lnode->lru); + } strcpy(root->inline_name, "/"); root->name = root->inline_name; -- cgit v1.2.3