diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2015-03-25 14:15:17 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-04-20 11:55:39 -0400 |
commit | 9571eb4f9617e89b3f979a3856b1296eba277bb1 (patch) | |
tree | 89a445d9a90e2ecbeed537933cafdfb260e3cb4a | |
parent | ff7eeb82cc16f25203b69f817cbbb85845c817fe (diff) |
libceph: simplify our debugfs attr macro
No need to do single_open()'s job ourselves.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r-- | include/linux/ceph/debugfs.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/include/linux/ceph/debugfs.h b/include/linux/ceph/debugfs.h index 1df086d7882d..29cf897cc5cd 100644 --- a/include/linux/ceph/debugfs.h +++ b/include/linux/ceph/debugfs.h | |||
@@ -7,13 +7,7 @@ | |||
7 | #define CEPH_DEFINE_SHOW_FUNC(name) \ | 7 | #define CEPH_DEFINE_SHOW_FUNC(name) \ |
8 | static int name##_open(struct inode *inode, struct file *file) \ | 8 | static int name##_open(struct inode *inode, struct file *file) \ |
9 | { \ | 9 | { \ |
10 | struct seq_file *sf; \ | 10 | return single_open(file, name, inode->i_private); \ |
11 | int ret; \ | ||
12 | \ | ||
13 | ret = single_open(file, name, NULL); \ | ||
14 | sf = file->private_data; \ | ||
15 | sf->private = inode->i_private; \ | ||
16 | return ret; \ | ||
17 | } \ | 11 | } \ |
18 | \ | 12 | \ |
19 | static const struct file_operations name##_fops = { \ | 13 | static const struct file_operations name##_fops = { \ |