diff options
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 182235923cdd..d359d8de22a4 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -196,6 +196,11 @@ struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid, | |||
196 | return inode; | 196 | return inode; |
197 | } | 197 | } |
198 | 198 | ||
199 | static void fuse_umount_begin(struct super_block *sb) | ||
200 | { | ||
201 | fuse_abort_conn(get_fuse_conn_super(sb)); | ||
202 | } | ||
203 | |||
199 | static void fuse_put_super(struct super_block *sb) | 204 | static void fuse_put_super(struct super_block *sb) |
200 | { | 205 | { |
201 | struct fuse_conn *fc = get_fuse_conn_super(sb); | 206 | struct fuse_conn *fc = get_fuse_conn_super(sb); |
@@ -454,6 +459,7 @@ static struct super_operations fuse_super_operations = { | |||
454 | .read_inode = fuse_read_inode, | 459 | .read_inode = fuse_read_inode, |
455 | .clear_inode = fuse_clear_inode, | 460 | .clear_inode = fuse_clear_inode, |
456 | .put_super = fuse_put_super, | 461 | .put_super = fuse_put_super, |
462 | .umount_begin = fuse_umount_begin, | ||
457 | .statfs = fuse_statfs, | 463 | .statfs = fuse_statfs, |
458 | .show_options = fuse_show_options, | 464 | .show_options = fuse_show_options, |
459 | }; | 465 | }; |
@@ -560,11 +566,21 @@ static ssize_t fuse_conn_waiting_show(struct fuse_conn *fc, char *page) | |||
560 | return sprintf(page, "%i\n", atomic_read(&fc->num_waiting)); | 566 | return sprintf(page, "%i\n", atomic_read(&fc->num_waiting)); |
561 | } | 567 | } |
562 | 568 | ||
569 | static ssize_t fuse_conn_abort_store(struct fuse_conn *fc, const char *page, | ||
570 | size_t count) | ||
571 | { | ||
572 | fuse_abort_conn(fc); | ||
573 | return count; | ||
574 | } | ||
575 | |||
563 | static struct fuse_conn_attr fuse_conn_waiting = | 576 | static struct fuse_conn_attr fuse_conn_waiting = |
564 | __ATTR(waiting, 0400, fuse_conn_waiting_show, NULL); | 577 | __ATTR(waiting, 0400, fuse_conn_waiting_show, NULL); |
578 | static struct fuse_conn_attr fuse_conn_abort = | ||
579 | __ATTR(abort, 0600, NULL, fuse_conn_abort_store); | ||
565 | 580 | ||
566 | static struct attribute *fuse_conn_attrs[] = { | 581 | static struct attribute *fuse_conn_attrs[] = { |
567 | &fuse_conn_waiting.attr, | 582 | &fuse_conn_waiting.attr, |
583 | &fuse_conn_abort.attr, | ||
568 | NULL, | 584 | NULL, |
569 | }; | 585 | }; |
570 | 586 | ||