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 'dlm-4.8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm

Pull dlm fix from David Teigland:
"This fixes a bug introduced by recent debugfs cleanup"

* tag 'dlm-4.8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
dlm: fix malfunction of dlm_tool caused by debugfs changes

+48 -14
+48 -14
fs/dlm/debug_fs.c
··· 607 607 static const struct file_operations format3_fops; 608 608 static const struct file_operations format4_fops; 609 609 610 - static int table_open(struct inode *inode, struct file *file) 610 + static int table_open1(struct inode *inode, struct file *file) 611 611 { 612 612 struct seq_file *seq; 613 - int ret = -1; 613 + int ret; 614 614 615 - if (file->f_op == &format1_fops) 616 - ret = seq_open(file, &format1_seq_ops); 617 - else if (file->f_op == &format2_fops) 618 - ret = seq_open(file, &format2_seq_ops); 619 - else if (file->f_op == &format3_fops) 620 - ret = seq_open(file, &format3_seq_ops); 621 - else if (file->f_op == &format4_fops) 622 - ret = seq_open(file, &format4_seq_ops); 615 + ret = seq_open(file, &format1_seq_ops); 616 + if (ret) 617 + return ret; 623 618 619 + seq = file->private_data; 620 + seq->private = inode->i_private; /* the dlm_ls */ 621 + return 0; 622 + } 623 + 624 + static int table_open2(struct inode *inode, struct file *file) 625 + { 626 + struct seq_file *seq; 627 + int ret; 628 + 629 + ret = seq_open(file, &format2_seq_ops); 630 + if (ret) 631 + return ret; 632 + 633 + seq = file->private_data; 634 + seq->private = inode->i_private; /* the dlm_ls */ 635 + return 0; 636 + } 637 + 638 + static int table_open3(struct inode *inode, struct file *file) 639 + { 640 + struct seq_file *seq; 641 + int ret; 642 + 643 + ret = seq_open(file, &format3_seq_ops); 644 + if (ret) 645 + return ret; 646 + 647 + seq = file->private_data; 648 + seq->private = inode->i_private; /* the dlm_ls */ 649 + return 0; 650 + } 651 + 652 + static int table_open4(struct inode *inode, struct file *file) 653 + { 654 + struct seq_file *seq; 655 + int ret; 656 + 657 + ret = seq_open(file, &format4_seq_ops); 624 658 if (ret) 625 659 return ret; 626 660 ··· 665 631 666 632 static const struct file_operations format1_fops = { 667 633 .owner = THIS_MODULE, 668 - .open = table_open, 634 + .open = table_open1, 669 635 .read = seq_read, 670 636 .llseek = seq_lseek, 671 637 .release = seq_release ··· 673 639 674 640 static const struct file_operations format2_fops = { 675 641 .owner = THIS_MODULE, 676 - .open = table_open, 642 + .open = table_open2, 677 643 .read = seq_read, 678 644 .llseek = seq_lseek, 679 645 .release = seq_release ··· 681 647 682 648 static const struct file_operations format3_fops = { 683 649 .owner = THIS_MODULE, 684 - .open = table_open, 650 + .open = table_open3, 685 651 .read = seq_read, 686 652 .llseek = seq_lseek, 687 653 .release = seq_release ··· 689 655 690 656 static const struct file_operations format4_fops = { 691 657 .owner = THIS_MODULE, 692 - .open = table_open, 658 + .open = table_open4, 693 659 .read = seq_read, 694 660 .llseek = seq_lseek, 695 661 .release = seq_release