aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/dev.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-01-17 01:14:34 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-17 02:15:30 -0500
commit9ba7cbba100bdaca7316d71d6c6298e61191f8b2 (patch)
tree999e964132731388ff312df78623020600fe32e2 /fs/fuse/dev.c
parentd77a1d5b611742c538364f041ff4610d27b14fe7 (diff)
[PATCH] fuse: extend semantics of connected flag
The ->connected flag for a fuse_conn object previously only indicated whether the device file for this connection is currently open or not. Change it's meaning so that it indicates whether the connection is active or not: now either umount or device release will clear the flag. The separate ->mounted flag is still needed for handling background requests. 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 609875dbd212..5cd43bf917a4 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -26,7 +26,7 @@ static struct fuse_conn *fuse_get_conn(struct file *file)
26 struct fuse_conn *fc; 26 struct fuse_conn *fc;
27 spin_lock(&fuse_lock); 27 spin_lock(&fuse_lock);
28 fc = file->private_data; 28 fc = file->private_data;
29 if (fc && !fc->mounted) 29 if (fc && !fc->connected)
30 fc = NULL; 30 fc = NULL;
31 spin_unlock(&fuse_lock); 31 spin_unlock(&fuse_lock);
32 return fc; 32 return fc;
@@ -594,7 +594,7 @@ static void request_wait(struct fuse_conn *fc)
594 DECLARE_WAITQUEUE(wait, current); 594 DECLARE_WAITQUEUE(wait, current);
595 595
596 add_wait_queue_exclusive(&fc->waitq, &wait); 596 add_wait_queue_exclusive(&fc->waitq, &wait);
597 while (fc->mounted && list_empty(&fc->pending)) { 597 while (fc->connected && list_empty(&fc->pending)) {
598 set_current_state(TASK_INTERRUPTIBLE); 598 set_current_state(TASK_INTERRUPTIBLE);
599 if (signal_pending(current)) 599 if (signal_pending(current))
600 break; 600 break;
@@ -634,7 +634,7 @@ static ssize_t fuse_dev_readv(struct file *file, const struct iovec *iov,
634 goto err_unlock; 634 goto err_unlock;
635 request_wait(fc); 635 request_wait(fc);
636 err = -ENODEV; 636 err = -ENODEV;
637 if (!fc->mounted) 637 if (!fc->connected)
638 goto err_unlock; 638 goto err_unlock;
639 err = -ERESTARTSYS; 639 err = -ERESTARTSYS;
640 if (list_empty(&fc->pending)) 640 if (list_empty(&fc->pending))