diff options
-rw-r--r-- | fs/fuse/dev.c | 6 | ||||
-rw-r--r-- | fs/fuse/fuse_i.h | 3 | ||||
-rw-r--r-- | fs/fuse/inode.c | 1 |
3 files changed, 6 insertions, 4 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)) |
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 5742253164d9..e824a09d3151 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h | |||
@@ -249,7 +249,8 @@ struct fuse_conn { | |||
249 | /** Mount is active */ | 249 | /** Mount is active */ |
250 | unsigned mounted : 1; | 250 | unsigned mounted : 1; |
251 | 251 | ||
252 | /** Connection established */ | 252 | /** Connection established, cleared on umount and device |
253 | release */ | ||
253 | unsigned connected : 1; | 254 | unsigned connected : 1; |
254 | 255 | ||
255 | /** Connection failed (version mismatch) */ | 256 | /** Connection failed (version mismatch) */ |
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index d7aaffe979dd..d6a09fdaa941 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -200,6 +200,7 @@ static void fuse_put_super(struct super_block *sb) | |||
200 | 200 | ||
201 | spin_lock(&fuse_lock); | 201 | spin_lock(&fuse_lock); |
202 | fc->mounted = 0; | 202 | fc->mounted = 0; |
203 | fc->connected = 0; | ||
203 | /* Flush all readers on this fs */ | 204 | /* Flush all readers on this fs */ |
204 | wake_up_all(&fc->waitq); | 205 | wake_up_all(&fc->waitq); |
205 | up_write(&fc->sbput_sem); | 206 | up_write(&fc->sbput_sem); |