Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129996
b: refs/heads/master
c: f6d47a1
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi authored and Miklos Szeredi committed Jan 26, 2009
1 parent e34367f commit 8222138
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26c3679101dbccc054dcf370143941844ba70531
refs/heads/master: f6d47a1761896dcd89e3184399a8962dff17267d
13 changes: 9 additions & 4 deletions trunk/fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,16 +826,21 @@ static int fuse_notify_poll(struct fuse_conn *fc, unsigned int size,
struct fuse_copy_state *cs)
{
struct fuse_notify_poll_wakeup_out outarg;
int err;
int err = -EINVAL;

if (size != sizeof(outarg))
return -EINVAL;
goto err;

err = fuse_copy_one(cs, &outarg, sizeof(outarg));
if (err)
return err;
goto err;

fuse_copy_finish(cs);
return fuse_notify_poll_wakeup(fc, &outarg);

err:
fuse_copy_finish(cs);
return err;
}

static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code,
Expand All @@ -846,6 +851,7 @@ static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code,
return fuse_notify_poll(fc, size, cs);

default:
fuse_copy_finish(cs);
return -EINVAL;
}
}
Expand Down Expand Up @@ -924,7 +930,6 @@ static ssize_t fuse_dev_write(struct kiocb *iocb, const struct iovec *iov,
*/
if (!oh.unique) {
err = fuse_notify(fc, oh.error, nbytes - sizeof(oh), &cs);
fuse_copy_finish(&cs);
return err ? err : nbytes;
}

Expand Down

0 comments on commit 8222138

Please sign in to comment.