diff options
Diffstat (limited to 'fs/fuse/control.c')
-rw-r--r-- | fs/fuse/control.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 4f3cab321415..99c99dfb0373 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | FUSE: Filesystem in Userspace | 2 | FUSE: Filesystem in Userspace |
3 | Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu> | 3 | Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu> |
4 | 4 | ||
5 | This program can be distributed under the terms of the GNU GPL. | 5 | This program can be distributed under the terms of the GNU GPL. |
6 | See the file COPYING. | 6 | See the file COPYING. |
@@ -48,11 +48,13 @@ static ssize_t fuse_conn_waiting_read(struct file *file, char __user *buf, | |||
48 | size_t size; | 48 | size_t size; |
49 | 49 | ||
50 | if (!*ppos) { | 50 | if (!*ppos) { |
51 | long value; | ||
51 | struct fuse_conn *fc = fuse_ctl_file_conn_get(file); | 52 | struct fuse_conn *fc = fuse_ctl_file_conn_get(file); |
52 | if (!fc) | 53 | if (!fc) |
53 | return 0; | 54 | return 0; |
54 | 55 | ||
55 | file->private_data=(void *)(long)atomic_read(&fc->num_waiting); | 56 | value = atomic_read(&fc->num_waiting); |
57 | file->private_data = (void *)value; | ||
56 | fuse_conn_put(fc); | 58 | fuse_conn_put(fc); |
57 | } | 59 | } |
58 | size = sprintf(tmp, "%ld\n", (long)file->private_data); | 60 | size = sprintf(tmp, "%ld\n", (long)file->private_data); |