diff options
-rw-r--r-- | fs/fuse/dev.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 71c4619af333..39706c57ad3c 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -1353,6 +1353,17 @@ static ssize_t fuse_dev_do_read(struct fuse_conn *fc, struct file *file, | |||
1353 | return err; | 1353 | return err; |
1354 | } | 1354 | } |
1355 | 1355 | ||
1356 | static int fuse_dev_open(struct inode *inode, struct file *file) | ||
1357 | { | ||
1358 | /* | ||
1359 | * The fuse device's file's private_data is used to hold | ||
1360 | * the fuse_conn(ection) when it is mounted, and is used to | ||
1361 | * keep track of whether the file has been mounted already. | ||
1362 | */ | ||
1363 | file->private_data = NULL; | ||
1364 | return 0; | ||
1365 | } | ||
1366 | |||
1356 | static ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov, | 1367 | static ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov, |
1357 | unsigned long nr_segs, loff_t pos) | 1368 | unsigned long nr_segs, loff_t pos) |
1358 | { | 1369 | { |
@@ -2220,6 +2231,7 @@ static int fuse_dev_fasync(int fd, struct file *file, int on) | |||
2220 | 2231 | ||
2221 | const struct file_operations fuse_dev_operations = { | 2232 | const struct file_operations fuse_dev_operations = { |
2222 | .owner = THIS_MODULE, | 2233 | .owner = THIS_MODULE, |
2234 | .open = fuse_dev_open, | ||
2223 | .llseek = no_llseek, | 2235 | .llseek = no_llseek, |
2224 | .read = do_sync_read, | 2236 | .read = do_sync_read, |
2225 | .aio_read = fuse_dev_read, | 2237 | .aio_read = fuse_dev_read, |