Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25550
b: refs/heads/master
c: 7025d9a
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Apr 11, 2006
1 parent cfdcfd9 commit 0f3b00f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: d3406ffa4af8af1d7c14cff06e003eb0a557d4ad
refs/heads/master: 7025d9ad10a38dadef8b286e0092731c2d3cdc53
11 changes: 6 additions & 5 deletions trunk/fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,17 +804,18 @@ static ssize_t fuse_dev_write(struct file *file, const char __user *buf,

static unsigned fuse_dev_poll(struct file *file, poll_table *wait)
{
struct fuse_conn *fc = fuse_get_conn(file);
unsigned mask = POLLOUT | POLLWRNORM;

struct fuse_conn *fc = fuse_get_conn(file);
if (!fc)
return -ENODEV;
return POLLERR;

poll_wait(file, &fc->waitq, wait);

spin_lock(&fuse_lock);
if (!list_empty(&fc->pending))
mask |= POLLIN | POLLRDNORM;
if (!fc->connected)
mask = POLLERR;
else if (!list_empty(&fc->pending))
mask |= POLLIN | POLLRDNORM;
spin_unlock(&fuse_lock);

return mask;
Expand Down

0 comments on commit 0f3b00f

Please sign in to comment.