Skip to content

Commit

Permalink
[PATCH] fuse: consolidate device errors
Browse files Browse the repository at this point in the history
Return consistent error values for the case when the opened device file has no
mount associated yet.

Signed-off-by: Miklos Szeredi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
szmi authored and Linus Torvalds committed Apr 11, 2006
1 parent d713311 commit a87046d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a87046d

Please sign in to comment.