summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2008-02-13 16:33:27 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2008-02-13 16:33:27 +0000
commitb6117f16f52a02735d650165cb92d5b9941a1e8c (patch)
treea76e429e09e10638da64c48d0988685f1095d3df
parent39a5c56862427082e15ffa0d005131a96f149aaa (diff)
downloadfuse-b6117f16f52a02735d650165cb92d5b9941a1e8c.tar.gz
Add missing bdi_init() and bdi_destroy() calls...
-rw-r--r--ChangeLog6
-rw-r--r--kernel/inode.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bb93b44..1a1eea4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add missing bdi_init() and bdi_destroy() calls for 2.6.24
+ kernel. Lack of bdi_init() could cause write to hang. Report
+ forwarded by Szakacsits Szabolcs from the NTFS-3G forum.
+
2008-02-03 Csaba Henk <csaba.henk@creo.hu>
* lib/mount_bsd.c:
diff --git a/kernel/inode.c b/kernel/inode.c
index 0a5900e..4e099b2 100644
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -470,6 +470,13 @@ static struct fuse_conn *new_conn(void)
fc = kzalloc(sizeof(*fc), GFP_KERNEL);
if (fc) {
+#ifdef KERNEL_2_6_24_PLUS
+ int err = bdi_init(&fc->bdi);
+ if (err) {
+ kfree(fc);
+ return NULL;
+ }
+#endif
spin_lock_init(&fc->lock);
mutex_init(&fc->inst_mutex);
atomic_set(&fc->count, 1);
@@ -496,6 +503,9 @@ void fuse_conn_put(struct fuse_conn *fc)
if (fc->destroy_req)
fuse_request_free(fc->destroy_req);
mutex_destroy(&fc->inst_mutex);
+#ifdef KERNEL_2_6_24_PLUS
+ bdi_destroy(&fc->bdi);
+#endif
kfree(fc);
}
}