Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'fuse-update-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse updates from Miklos Szeredi:

- Allow mounting an active fuse device. Previously the fuse device
would always be mounted during initialization, and sharing a fuse
superblock was only possible through mount or namespace cloning

- Fix data flushing in syncfs (virtiofs only)

- Fix data flushing in copy_file_range()

- Fix a possible deadlock in atomic O_TRUNC

- Misc fixes and cleanups

* tag 'fuse-update-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: remove unused arg in fuse_write_file_get()
fuse: wait for writepages in syncfs
fuse: flush extending writes
fuse: truncate pagecache on atomic_o_trunc
fuse: allow sharing existing sb
fuse: move fget() to fuse_get_tree()
fuse: move option checking into fuse_fill_super()
fuse: name fs_context consistently
fuse: fix use after free in fuse_read_interrupt()

+214 -80
+5 -5
fs/fuse/control.c
··· 328 328 drop_nlink(d_inode(fuse_control_sb->s_root)); 329 329 } 330 330 331 - static int fuse_ctl_fill_super(struct super_block *sb, struct fs_context *fctx) 331 + static int fuse_ctl_fill_super(struct super_block *sb, struct fs_context *fsc) 332 332 { 333 333 static const struct tree_descr empty_descr = {""}; 334 334 struct fuse_conn *fc; ··· 354 354 return 0; 355 355 } 356 356 357 - static int fuse_ctl_get_tree(struct fs_context *fc) 357 + static int fuse_ctl_get_tree(struct fs_context *fsc) 358 358 { 359 - return get_tree_single(fc, fuse_ctl_fill_super); 359 + return get_tree_single(fsc, fuse_ctl_fill_super); 360 360 } 361 361 362 362 static const struct fs_context_operations fuse_ctl_context_ops = { 363 363 .get_tree = fuse_ctl_get_tree, 364 364 }; 365 365 366 - static int fuse_ctl_init_fs_context(struct fs_context *fc) 366 + static int fuse_ctl_init_fs_context(struct fs_context *fsc) 367 367 { 368 - fc->ops = &fuse_ctl_context_ops; 368 + fsc->ops = &fuse_ctl_context_ops; 369 369 return 0; 370 370 } 371 371
+2 -2
fs/fuse/dev.c
··· 288 288 289 289 /* 290 290 * test_and_set_bit() implies smp_mb() between bit 291 - * changing and below intr_entry check. Pairs with 291 + * changing and below FR_INTERRUPTED check. Pairs with 292 292 * smp_mb() from queue_interrupt(). 293 293 */ 294 - if (!list_empty(&req->intr_entry)) { 294 + if (test_bit(FR_INTERRUPTED, &req->flags)) { 295 295 spin_lock(&fiq->lock); 296 296 list_del_init(&req->intr_entry); 297 297 spin_unlock(&fiq->lock);
+33 -12
fs/fuse/file.c
··· 198 198 struct fuse_file *ff = file->private_data; 199 199 struct fuse_conn *fc = get_fuse_conn(inode); 200 200 201 - if (!(ff->open_flags & FOPEN_KEEP_CACHE)) 202 - invalidate_inode_pages2(inode->i_mapping); 203 201 if (ff->open_flags & FOPEN_STREAM) 204 202 stream_open(inode, file); 205 203 else if (ff->open_flags & FOPEN_NONSEEKABLE) 206 204 nonseekable_open(inode, file); 205 + 207 206 if (fc->atomic_o_trunc && (file->f_flags & O_TRUNC)) { 208 207 struct fuse_inode *fi = get_fuse_inode(inode); 209 208 ··· 210 211 fi->attr_version = atomic64_inc_return(&fc->attr_version); 211 212 i_size_write(inode, 0); 212 213 spin_unlock(&fi->lock); 214 + truncate_pagecache(inode, 0); 213 215 fuse_invalidate_attr(inode); 214 216 if (fc->writeback_cache) 215 217 file_update_time(file); 218 + } else if (!(ff->open_flags & FOPEN_KEEP_CACHE)) { 219 + invalidate_inode_pages2(inode->i_mapping); 216 220 } 221 + 217 222 if ((file->f_mode & FMODE_WRITE) && fc->writeback_cache) 218 223 fuse_link_write_file(file); 219 224 } ··· 392 389 struct list_head queue_entry; 393 390 struct fuse_writepage_args *next; 394 391 struct inode *inode; 392 + struct fuse_sync_bucket *bucket; 395 393 }; 396 394 397 395 static struct fuse_writepage_args *fuse_find_writeback(struct fuse_inode *fi, ··· 1612 1608 struct fuse_args_pages *ap = &wpa->ia.ap; 1613 1609 int i; 1614 1610 1611 + if (wpa->bucket) 1612 + fuse_sync_bucket_dec(wpa->bucket); 1613 + 1615 1614 for (i = 0; i < ap->num_pages; i++) 1616 1615 __free_page(ap->pages[i]); 1617 1616 ··· 1820 1813 fuse_writepage_free(wpa); 1821 1814 } 1822 1815 1823 - static struct fuse_file *__fuse_write_file_get(struct fuse_conn *fc, 1824 - struct fuse_inode *fi) 1816 + static struct fuse_file *__fuse_write_file_get(struct fuse_inode *fi) 1825 1817 { 1826 1818 struct fuse_file *ff = NULL; 1827 1819 ··· 1835 1829 return ff; 1836 1830 } 1837 1831 1838 - static struct fuse_file *fuse_write_file_get(struct fuse_conn *fc, 1839 - struct fuse_inode *fi) 1832 + static struct fuse_file *fuse_write_file_get(struct fuse_inode *fi) 1840 1833 { 1841 - struct fuse_file *ff = __fuse_write_file_get(fc, fi); 1834 + struct fuse_file *ff = __fuse_write_file_get(fi); 1842 1835 WARN_ON(!ff); 1843 1836 return ff; 1844 1837 } 1845 1838 1846 1839 int fuse_write_inode(struct inode *inode, struct writeback_control *wbc) 1847 1840 { 1848 - struct fuse_conn *fc = get_fuse_conn(inode); 1849 1841 struct fuse_inode *fi = get_fuse_inode(inode); 1850 1842 struct fuse_file *ff; 1851 1843 int err; 1852 1844 1853 - ff = __fuse_write_file_get(fc, fi); 1845 + ff = __fuse_write_file_get(fi); 1854 1846 err = fuse_flush_times(inode, ff); 1855 1847 if (ff) 1856 1848 fuse_file_put(ff, false, false); ··· 1875 1871 1876 1872 } 1877 1873 1874 + static void fuse_writepage_add_to_bucket(struct fuse_conn *fc, 1875 + struct fuse_writepage_args *wpa) 1876 + { 1877 + if (!fc->sync_fs) 1878 + return; 1879 + 1880 + rcu_read_lock(); 1881 + /* Prevent resurrection of dead bucket in unlikely race with syncfs */ 1882 + do { 1883 + wpa->bucket = rcu_dereference(fc->curr_bucket); 1884 + } while (unlikely(!atomic_inc_not_zero(&wpa->bucket->count))); 1885 + rcu_read_unlock(); 1886 + } 1887 + 1878 1888 static int fuse_writepage_locked(struct page *page) 1879 1889 { 1880 1890 struct address_space *mapping = page->mapping; ··· 1912 1894 goto err_free; 1913 1895 1914 1896 error = -EIO; 1915 - wpa->ia.ff = fuse_write_file_get(fc, fi); 1897 + wpa->ia.ff = fuse_write_file_get(fi); 1916 1898 if (!wpa->ia.ff) 1917 1899 goto err_nofile; 1918 1900 1901 + fuse_writepage_add_to_bucket(fc, wpa); 1919 1902 fuse_write_args_fill(&wpa->ia, wpa->ia.ff, page_offset(page), 0); 1920 1903 1921 1904 copy_highpage(tmp_page, page); ··· 2132 2113 2133 2114 if (!data->ff) { 2134 2115 err = -EIO; 2135 - data->ff = fuse_write_file_get(fc, fi); 2116 + data->ff = fuse_write_file_get(fi); 2136 2117 if (!data->ff) 2137 2118 goto out_unlock; 2138 2119 } ··· 2167 2148 __free_page(tmp_page); 2168 2149 goto out_unlock; 2169 2150 } 2151 + fuse_writepage_add_to_bucket(fc, wpa); 2152 + 2170 2153 data->max_pages = 1; 2171 2154 2172 2155 ap = &wpa->ia.ap; ··· 2902 2881 2903 2882 static int fuse_writeback_range(struct inode *inode, loff_t start, loff_t end) 2904 2883 { 2905 - int err = filemap_write_and_wait_range(inode->i_mapping, start, end); 2884 + int err = filemap_write_and_wait_range(inode->i_mapping, start, -1); 2906 2885 2907 2886 if (!err) 2908 2887 fuse_sync_writes(inode);
+20
fs/fuse/fuse_i.h
··· 482 482 483 483 struct fuse_fs_context { 484 484 int fd; 485 + struct file *file; 485 486 unsigned int rootmode; 486 487 kuid_t user_id; 487 488 kgid_t group_id; ··· 507 506 508 507 /* fuse_dev pointer to fill in, should contain NULL on entry */ 509 508 void **fudptr; 509 + }; 510 + 511 + struct fuse_sync_bucket { 512 + /* count is a possible scalability bottleneck */ 513 + atomic_t count; 514 + wait_queue_head_t waitq; 515 + struct rcu_head rcu; 510 516 }; 511 517 512 518 /** ··· 808 800 809 801 /** List of filesystems using this connection */ 810 802 struct list_head mounts; 803 + 804 + /* New writepages go into this bucket */ 805 + struct fuse_sync_bucket __rcu *curr_bucket; 811 806 }; 812 807 813 808 /* ··· 912 901 913 902 for (i = index; i < index + nr_pages; i++) 914 903 descs[i].length = PAGE_SIZE - descs[i].offset; 904 + } 905 + 906 + static inline void fuse_sync_bucket_dec(struct fuse_sync_bucket *bucket) 907 + { 908 + /* Need RCU protection to prevent use after free after the decrement */ 909 + rcu_read_lock(); 910 + if (atomic_dec_and_test(&bucket->count)) 911 + wake_up(&bucket->waitq); 912 + rcu_read_unlock(); 915 913 } 916 914 917 915 /** Device operations */
+148 -55
fs/fuse/inode.c
··· 137 137 } 138 138 } 139 139 140 - static int fuse_reconfigure(struct fs_context *fc) 140 + static int fuse_reconfigure(struct fs_context *fsc) 141 141 { 142 - struct super_block *sb = fc->root->d_sb; 142 + struct super_block *sb = fsc->root->d_sb; 143 143 144 144 sync_filesystem(sb); 145 - if (fc->sb_flags & SB_MANDLOCK) 145 + if (fsc->sb_flags & SB_MANDLOCK) 146 146 return -EINVAL; 147 147 148 148 return 0; ··· 505 505 return err; 506 506 } 507 507 508 + static struct fuse_sync_bucket *fuse_sync_bucket_alloc(void) 509 + { 510 + struct fuse_sync_bucket *bucket; 511 + 512 + bucket = kzalloc(sizeof(*bucket), GFP_KERNEL | __GFP_NOFAIL); 513 + if (bucket) { 514 + init_waitqueue_head(&bucket->waitq); 515 + /* Initial active count */ 516 + atomic_set(&bucket->count, 1); 517 + } 518 + return bucket; 519 + } 520 + 521 + static void fuse_sync_fs_writes(struct fuse_conn *fc) 522 + { 523 + struct fuse_sync_bucket *bucket, *new_bucket; 524 + int count; 525 + 526 + new_bucket = fuse_sync_bucket_alloc(); 527 + spin_lock(&fc->lock); 528 + bucket = rcu_dereference_protected(fc->curr_bucket, 1); 529 + count = atomic_read(&bucket->count); 530 + WARN_ON(count < 1); 531 + /* No outstanding writes? */ 532 + if (count == 1) { 533 + spin_unlock(&fc->lock); 534 + kfree(new_bucket); 535 + return; 536 + } 537 + 538 + /* 539 + * Completion of new bucket depends on completion of this bucket, so add 540 + * one more count. 541 + */ 542 + atomic_inc(&new_bucket->count); 543 + rcu_assign_pointer(fc->curr_bucket, new_bucket); 544 + spin_unlock(&fc->lock); 545 + /* 546 + * Drop initial active count. At this point if all writes in this and 547 + * ancestor buckets complete, the count will go to zero and this task 548 + * will be woken up. 549 + */ 550 + atomic_dec(&bucket->count); 551 + 552 + wait_event(bucket->waitq, atomic_read(&bucket->count) == 0); 553 + 554 + /* Drop temp count on descendant bucket */ 555 + fuse_sync_bucket_dec(new_bucket); 556 + kfree_rcu(bucket, rcu); 557 + } 558 + 508 559 static int fuse_sync_fs(struct super_block *sb, int wait) 509 560 { 510 561 struct fuse_mount *fm = get_fuse_mount_super(sb); ··· 577 526 578 527 if (!fc->sync_fs) 579 528 return 0; 529 + 530 + fuse_sync_fs_writes(fc); 580 531 581 532 memset(&inarg, 0, sizeof(inarg)); 582 533 args.in_numargs = 1; ··· 625 572 {} 626 573 }; 627 574 628 - static int fuse_parse_param(struct fs_context *fc, struct fs_parameter *param) 575 + static int fuse_parse_param(struct fs_context *fsc, struct fs_parameter *param) 629 576 { 630 577 struct fs_parse_result result; 631 - struct fuse_fs_context *ctx = fc->fs_private; 578 + struct fuse_fs_context *ctx = fsc->fs_private; 632 579 int opt; 633 580 634 - if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) { 581 + if (fsc->purpose == FS_CONTEXT_FOR_RECONFIGURE) { 635 582 /* 636 583 * Ignore options coming from mount(MS_REMOUNT) for backward 637 584 * compatibility. 638 585 */ 639 - if (fc->oldapi) 586 + if (fsc->oldapi) 640 587 return 0; 641 588 642 - return invalfc(fc, "No changes allowed in reconfigure"); 589 + return invalfc(fsc, "No changes allowed in reconfigure"); 643 590 } 644 591 645 - opt = fs_parse(fc, fuse_fs_parameters, param, &result); 592 + opt = fs_parse(fsc, fuse_fs_parameters, param, &result); 646 593 if (opt < 0) 647 594 return opt; 648 595 649 596 switch (opt) { 650 597 case OPT_SOURCE: 651 - if (fc->source) 652 - return invalfc(fc, "Multiple sources specified"); 653 - fc->source = param->string; 598 + if (fsc->source) 599 + return invalfc(fsc, "Multiple sources specified"); 600 + fsc->source = param->string; 654 601 param->string = NULL; 655 602 break; 656 603 657 604 case OPT_SUBTYPE: 658 605 if (ctx->subtype) 659 - return invalfc(fc, "Multiple subtypes specified"); 606 + return invalfc(fsc, "Multiple subtypes specified"); 660 607 ctx->subtype = param->string; 661 608 param->string = NULL; 662 609 return 0; ··· 668 615 669 616 case OPT_ROOTMODE: 670 617 if (!fuse_valid_type(result.uint_32)) 671 - return invalfc(fc, "Invalid rootmode"); 618 + return invalfc(fsc, "Invalid rootmode"); 672 619 ctx->rootmode = result.uint_32; 673 620 ctx->rootmode_present = true; 674 621 break; 675 622 676 623 case OPT_USER_ID: 677 - ctx->user_id = make_kuid(fc->user_ns, result.uint_32); 624 + ctx->user_id = make_kuid(fsc->user_ns, result.uint_32); 678 625 if (!uid_valid(ctx->user_id)) 679 - return invalfc(fc, "Invalid user_id"); 626 + return invalfc(fsc, "Invalid user_id"); 680 627 ctx->user_id_present = true; 681 628 break; 682 629 683 630 case OPT_GROUP_ID: 684 - ctx->group_id = make_kgid(fc->user_ns, result.uint_32); 631 + ctx->group_id = make_kgid(fsc->user_ns, result.uint_32); 685 632 if (!gid_valid(ctx->group_id)) 686 - return invalfc(fc, "Invalid group_id"); 633 + return invalfc(fsc, "Invalid group_id"); 687 634 ctx->group_id_present = true; 688 635 break; 689 636 ··· 701 648 702 649 case OPT_BLKSIZE: 703 650 if (!ctx->is_bdev) 704 - return invalfc(fc, "blksize only supported for fuseblk"); 651 + return invalfc(fsc, "blksize only supported for fuseblk"); 705 652 ctx->blksize = result.uint_32; 706 653 break; 707 654 ··· 712 659 return 0; 713 660 } 714 661 715 - static void fuse_free_fc(struct fs_context *fc) 662 + static void fuse_free_fsc(struct fs_context *fsc) 716 663 { 717 - struct fuse_fs_context *ctx = fc->fs_private; 664 + struct fuse_fs_context *ctx = fsc->fs_private; 718 665 719 666 if (ctx) { 720 667 kfree(ctx->subtype); ··· 815 762 { 816 763 if (refcount_dec_and_test(&fc->count)) { 817 764 struct fuse_iqueue *fiq = &fc->iq; 765 + struct fuse_sync_bucket *bucket; 818 766 819 767 if (IS_ENABLED(CONFIG_FUSE_DAX)) 820 768 fuse_dax_conn_free(fc); ··· 823 769 fiq->ops->release(fiq); 824 770 put_pid_ns(fc->pid_ns); 825 771 put_user_ns(fc->user_ns); 772 + bucket = rcu_dereference_protected(fc->curr_bucket, 1); 773 + if (bucket) { 774 + WARN_ON(atomic_read(&bucket->count) != 1); 775 + kfree(bucket); 776 + } 826 777 fc->release(fc); 827 778 } 828 779 } ··· 1476 1417 if (sb->s_flags & SB_MANDLOCK) 1477 1418 goto err; 1478 1419 1420 + rcu_assign_pointer(fc->curr_bucket, fuse_sync_bucket_alloc()); 1479 1421 fuse_sb_defaults(sb); 1480 1422 1481 1423 if (ctx->is_bdev) { ··· 1568 1508 static int fuse_fill_super(struct super_block *sb, struct fs_context *fsc) 1569 1509 { 1570 1510 struct fuse_fs_context *ctx = fsc->fs_private; 1571 - struct file *file; 1572 1511 int err; 1573 1512 struct fuse_conn *fc; 1574 1513 struct fuse_mount *fm; 1575 1514 1576 - err = -EINVAL; 1577 - file = fget(ctx->fd); 1578 - if (!file) 1579 - goto err; 1515 + if (!ctx->file || !ctx->rootmode_present || 1516 + !ctx->user_id_present || !ctx->group_id_present) 1517 + return -EINVAL; 1580 1518 1581 1519 /* 1582 1520 * Require mount to happen from the same user namespace which 1583 1521 * opened /dev/fuse to prevent potential attacks. 1584 1522 */ 1585 - if ((file->f_op != &fuse_dev_operations) || 1586 - (file->f_cred->user_ns != sb->s_user_ns)) 1587 - goto err_fput; 1588 - ctx->fudptr = &file->private_data; 1523 + err = -EINVAL; 1524 + if ((ctx->file->f_op != &fuse_dev_operations) || 1525 + (ctx->file->f_cred->user_ns != sb->s_user_ns)) 1526 + goto err; 1527 + ctx->fudptr = &ctx->file->private_data; 1589 1528 1590 1529 fc = kmalloc(sizeof(*fc), GFP_KERNEL); 1591 1530 err = -ENOMEM; 1592 1531 if (!fc) 1593 - goto err_fput; 1532 + goto err; 1594 1533 1595 1534 fm = kzalloc(sizeof(*fm), GFP_KERNEL); 1596 1535 if (!fm) { 1597 1536 kfree(fc); 1598 - goto err_fput; 1537 + goto err; 1599 1538 } 1600 1539 1601 1540 fuse_conn_init(fc, fm, sb->s_user_ns, &fuse_dev_fiq_ops, NULL); ··· 1605 1546 err = fuse_fill_super_common(sb, ctx); 1606 1547 if (err) 1607 1548 goto err_put_conn; 1608 - /* 1609 - * atomic_dec_and_test() in fput() provides the necessary 1610 - * memory barrier for file->private_data to be visible on all 1611 - * CPUs after this 1612 - */ 1613 - fput(file); 1549 + /* file->private_data shall be visible on all CPUs after this */ 1550 + smp_mb(); 1614 1551 fuse_send_init(get_fuse_mount_super(sb)); 1615 1552 return 0; 1616 1553 ··· 1614 1559 fuse_conn_put(fc); 1615 1560 kfree(fm); 1616 1561 sb->s_fs_info = NULL; 1617 - err_fput: 1618 - fput(file); 1619 1562 err: 1620 1563 return err; 1621 1564 } 1622 1565 1623 - static int fuse_get_tree(struct fs_context *fc) 1566 + /* 1567 + * This is the path where user supplied an already initialized fuse dev. In 1568 + * this case never create a new super if the old one is gone. 1569 + */ 1570 + static int fuse_set_no_super(struct super_block *sb, struct fs_context *fsc) 1624 1571 { 1625 - struct fuse_fs_context *ctx = fc->fs_private; 1572 + return -ENOTCONN; 1573 + } 1626 1574 1627 - if (!ctx->fd_present || !ctx->rootmode_present || 1628 - !ctx->user_id_present || !ctx->group_id_present) 1575 + static int fuse_test_super(struct super_block *sb, struct fs_context *fsc) 1576 + { 1577 + 1578 + return fsc->sget_key == get_fuse_conn_super(sb); 1579 + } 1580 + 1581 + static int fuse_get_tree(struct fs_context *fsc) 1582 + { 1583 + struct fuse_fs_context *ctx = fsc->fs_private; 1584 + struct fuse_dev *fud; 1585 + struct super_block *sb; 1586 + int err; 1587 + 1588 + if (ctx->fd_present) 1589 + ctx->file = fget(ctx->fd); 1590 + 1591 + if (IS_ENABLED(CONFIG_BLOCK) && ctx->is_bdev) { 1592 + err = get_tree_bdev(fsc, fuse_fill_super); 1593 + goto out_fput; 1594 + } 1595 + /* 1596 + * While block dev mount can be initialized with a dummy device fd 1597 + * (found by device name), normal fuse mounts can't 1598 + */ 1599 + if (!ctx->file) 1629 1600 return -EINVAL; 1630 1601 1631 - #ifdef CONFIG_BLOCK 1632 - if (ctx->is_bdev) 1633 - return get_tree_bdev(fc, fuse_fill_super); 1634 - #endif 1635 - 1636 - return get_tree_nodev(fc, fuse_fill_super); 1602 + /* 1603 + * Allow creating a fuse mount with an already initialized fuse 1604 + * connection 1605 + */ 1606 + fud = READ_ONCE(ctx->file->private_data); 1607 + if (ctx->file->f_op == &fuse_dev_operations && fud) { 1608 + fsc->sget_key = fud->fc; 1609 + sb = sget_fc(fsc, fuse_test_super, fuse_set_no_super); 1610 + err = PTR_ERR_OR_ZERO(sb); 1611 + if (!IS_ERR(sb)) 1612 + fsc->root = dget(sb->s_root); 1613 + } else { 1614 + err = get_tree_nodev(fsc, fuse_fill_super); 1615 + } 1616 + out_fput: 1617 + if (ctx->file) 1618 + fput(ctx->file); 1619 + return err; 1637 1620 } 1638 1621 1639 1622 static const struct fs_context_operations fuse_context_ops = { 1640 - .free = fuse_free_fc, 1623 + .free = fuse_free_fsc, 1641 1624 .parse_param = fuse_parse_param, 1642 1625 .reconfigure = fuse_reconfigure, 1643 1626 .get_tree = fuse_get_tree, ··· 1684 1591 /* 1685 1592 * Set up the filesystem mount context. 1686 1593 */ 1687 - static int fuse_init_fs_context(struct fs_context *fc) 1594 + static int fuse_init_fs_context(struct fs_context *fsc) 1688 1595 { 1689 1596 struct fuse_fs_context *ctx; 1690 1597 ··· 1697 1604 ctx->legacy_opts_show = true; 1698 1605 1699 1606 #ifdef CONFIG_BLOCK 1700 - if (fc->fs_type == &fuseblk_fs_type) { 1607 + if (fsc->fs_type == &fuseblk_fs_type) { 1701 1608 ctx->is_bdev = true; 1702 1609 ctx->destroy = true; 1703 1610 } 1704 1611 #endif 1705 1612 1706 - fc->fs_private = ctx; 1707 - fc->ops = &fuse_context_ops; 1613 + fsc->fs_private = ctx; 1614 + fsc->ops = &fuse_context_ops; 1708 1615 return 0; 1709 1616 } 1710 1617
+6 -6
fs/fuse/virtio_fs.c
··· 97 97 {} 98 98 }; 99 99 100 - static int virtio_fs_parse_param(struct fs_context *fc, 100 + static int virtio_fs_parse_param(struct fs_context *fsc, 101 101 struct fs_parameter *param) 102 102 { 103 103 struct fs_parse_result result; 104 - struct fuse_fs_context *ctx = fc->fs_private; 104 + struct fuse_fs_context *ctx = fsc->fs_private; 105 105 int opt; 106 106 107 - opt = fs_parse(fc, virtio_fs_parameters, param, &result); 107 + opt = fs_parse(fsc, virtio_fs_parameters, param, &result); 108 108 if (opt < 0) 109 109 return opt; 110 110 ··· 119 119 return 0; 120 120 } 121 121 122 - static void virtio_fs_free_fc(struct fs_context *fc) 122 + static void virtio_fs_free_fsc(struct fs_context *fsc) 123 123 { 124 - struct fuse_fs_context *ctx = fc->fs_private; 124 + struct fuse_fs_context *ctx = fsc->fs_private; 125 125 126 126 kfree(ctx); 127 127 } ··· 1488 1488 } 1489 1489 1490 1490 static const struct fs_context_operations virtio_fs_context_ops = { 1491 - .free = virtio_fs_free_fc, 1491 + .free = virtio_fs_free_fsc, 1492 1492 .parse_param = virtio_fs_parse_param, 1493 1493 .get_tree = virtio_fs_get_tree, 1494 1494 };