diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-17 18:18:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-17 18:18:19 -0500 |
commit | c6b1de1b646fe232206d4065df4d14040cebd613 (patch) | |
tree | 271b208be1e0e6e026da5979311197fe5a791a11 /drivers/infiniband/hw | |
parent | 50652963eae6afe13678dc84d789a174306a4df7 (diff) | |
parent | e59b4e9187bd5175b9845dc10fedb0879b7efbfd (diff) |
Merge branch 'debugfs_automount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull debugfs patches from Al Viro:
"debugfs patches, mostly to make it possible for something like tracefs
to be transparently automounted on given directory in debugfs.
New primitive in there is debugfs_create_automount(name, parent, func,
arg), which creates a directory and makes its ->d_automount() return
func(arg). Another missing primitive was debugfs_create_file_size() -
open-coded in quite a few places. Dave's patch adds it and converts
the open-code instances to calling it"
* 'debugfs_automount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
debugfs: Provide a file creation function that also takes an initial size
new primitive: debugfs_create_automount()
debugfs: split end_creating() into success and failure cases
debugfs: take mode-dependent parts of debugfs_get_inode() into callers
fold debugfs_mknod() into callers
fold debugfs_create() into caller
fold debugfs_mkdir() into caller
debugfs_mknod(): get rid useless arguments
fold debugfs_link() into caller
debugfs: kill __create_file()
debugfs: split the beginning and the end of __create_file() off
debugfs_{mkdir,create,link}(): get rid of redundant argument
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/device.c | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c index aafdbcd84fc4..8fb295e4a9ab 100644 --- a/drivers/infiniband/hw/cxgb4/device.c +++ b/drivers/infiniband/hw/cxgb4/device.c | |||
@@ -700,37 +700,24 @@ static const struct file_operations ep_debugfs_fops = { | |||
700 | 700 | ||
701 | static int setup_debugfs(struct c4iw_dev *devp) | 701 | static int setup_debugfs(struct c4iw_dev *devp) |
702 | { | 702 | { |
703 | struct dentry *de; | ||
704 | |||
705 | if (!devp->debugfs_root) | 703 | if (!devp->debugfs_root) |
706 | return -1; | 704 | return -1; |
707 | 705 | ||
708 | de = debugfs_create_file("qps", S_IWUSR, devp->debugfs_root, | 706 | debugfs_create_file_size("qps", S_IWUSR, devp->debugfs_root, |
709 | (void *)devp, &qp_debugfs_fops); | 707 | (void *)devp, &qp_debugfs_fops, 4096); |
710 | if (de && de->d_inode) | ||
711 | de->d_inode->i_size = 4096; | ||
712 | 708 | ||
713 | de = debugfs_create_file("stags", S_IWUSR, devp->debugfs_root, | 709 | debugfs_create_file_size("stags", S_IWUSR, devp->debugfs_root, |
714 | (void *)devp, &stag_debugfs_fops); | 710 | (void *)devp, &stag_debugfs_fops, 4096); |
715 | if (de && de->d_inode) | ||
716 | de->d_inode->i_size = 4096; | ||
717 | 711 | ||
718 | de = debugfs_create_file("stats", S_IWUSR, devp->debugfs_root, | 712 | debugfs_create_file_size("stats", S_IWUSR, devp->debugfs_root, |
719 | (void *)devp, &stats_debugfs_fops); | 713 | (void *)devp, &stats_debugfs_fops, 4096); |
720 | if (de && de->d_inode) | ||
721 | de->d_inode->i_size = 4096; | ||
722 | 714 | ||
723 | de = debugfs_create_file("eps", S_IWUSR, devp->debugfs_root, | 715 | debugfs_create_file_size("eps", S_IWUSR, devp->debugfs_root, |
724 | (void *)devp, &ep_debugfs_fops); | 716 | (void *)devp, &ep_debugfs_fops, 4096); |
725 | if (de && de->d_inode) | ||
726 | de->d_inode->i_size = 4096; | ||
727 | 717 | ||
728 | if (c4iw_wr_log) { | 718 | if (c4iw_wr_log) |
729 | de = debugfs_create_file("wr_log", S_IWUSR, devp->debugfs_root, | 719 | debugfs_create_file_size("wr_log", S_IWUSR, devp->debugfs_root, |
730 | (void *)devp, &wr_log_debugfs_fops); | 720 | (void *)devp, &wr_log_debugfs_fops, 4096); |
731 | if (de && de->d_inode) | ||
732 | de->d_inode->i_size = 4096; | ||
733 | } | ||
734 | return 0; | 721 | return 0; |
735 | } | 722 | } |
736 | 723 | ||