From: Miklos Szeredi Return consistent error values for the case when the opened device file has no mount associated yet. Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton --- fs/fuse/dev.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN fs/fuse/dev.c~fuse-consolidate-device-errors fs/fuse/dev.c --- devel/fs/fuse/dev.c~fuse-consolidate-device-errors 2006-04-01 16:22:47.000000000 -0800 +++ devel-akpm/fs/fuse/dev.c 2006-04-01 16:22:47.000000000 -0800 @@ -739,7 +739,7 @@ static ssize_t fuse_dev_writev(struct fi struct fuse_copy_state cs; struct fuse_conn *fc = fuse_get_conn(file); if (!fc) - return -ENODEV; + return -EPERM; fuse_copy_init(&cs, fc, 0, NULL, iov, nr_segs); if (nbytes < sizeof(struct fuse_out_header)) @@ -930,7 +930,7 @@ static int fuse_dev_fasync(int fd, struc { struct fuse_conn *fc = fuse_get_conn(file); if (!fc) - return -ENODEV; + return -EPERM; /* No locking - fasync_helper does its own locking */ return fasync_helper(fd, file, on, &fc->fasync); _