diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2008-02-13 16:33:27 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2008-02-13 16:33:27 +0000 |
commit | b6117f16f52a02735d650165cb92d5b9941a1e8c (patch) | |
tree | a76e429e09e10638da64c48d0988685f1095d3df | |
parent | 39a5c56862427082e15ffa0d005131a96f149aaa (diff) | |
download | fuse-b6117f16f52a02735d650165cb92d5b9941a1e8c.tar.gz |
Add missing bdi_init() and bdi_destroy() calls...
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | kernel/inode.c | 10 |
2 files changed, 16 insertions, 0 deletions
@@ -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); } } |