From: Miklos Szeredi <miklos@szeredi.hu>

This patch makes fuse_fill_super() return correct error value in case
of OOM.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/fuse/inode.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -puN fs/fuse/inode.c~fuse-device-functions-fix fs/fuse/inode.c
--- 25/fs/fuse/inode.c~fuse-device-functions-fix	2005-01-26 17:27:53.926118864 -0800
+++ 25-akpm/fs/fuse/inode.c	2005-01-26 17:27:53.929118408 -0800
@@ -285,14 +285,14 @@ static struct fuse_conn *get_conn(struct
 	struct fuse_conn *fc;
 
 	if (file->f_op != &fuse_dev_operations)
-		return NULL;
+		return ERR_PTR(-EINVAL);
 	fc = new_conn();
 	if (fc == NULL)
-		return NULL;
+		return ERR_PTR(-ENOMEM);
 	spin_lock(&fuse_lock);
 	if (file->private_data) {
 		free_conn(fc);
-		fc = NULL;
+		fc = ERR_PTR(-EINVAL);
 	} else {
 		file->private_data = fc;
 		fc->sb = sb;
@@ -355,8 +355,8 @@ static int fuse_fill_super(struct super_
 
 	fc = get_conn(file, sb);
 	fput(file);
-	if (fc == NULL)
-		return -EINVAL;
+	if (IS_ERR(fc))
+		return PTR_ERR(fc);
 
 	fc->user_id = d.user_id;
 
_