diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-04-10 22:54:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 06:18:48 -0700 |
commit | a87046d822f2d982d25b24c4a644d34f22d4888a (patch) | |
tree | 582a3a2a89015bf09ad9a73df8d06cd7272b3b46 /fs/fuse/dev.c | |
parent | d713311464bcca73c990d1a1b5c9467eae87f5b4 (diff) | |
download | lwn-a87046d822f2d982d25b24c4a644d34f22d4888a.tar.gz lwn-a87046d822f2d982d25b24c4a644d34f22d4888a.zip |
[PATCH] fuse: consolidate device errors
Return consistent error values for the case when the opened device file has no
mount associated yet.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 63d2cf43b5e3..6b8843d4ad8c 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -739,7 +739,7 @@ static ssize_t fuse_dev_writev(struct file *file, const struct iovec *iov, 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, struct file *file, int on) { 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); |