diff options
author | Peng Tao <bergwolf@gmail.com> | 2013-06-06 23:04:06 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-06 11:39:53 -0700 |
commit | 92ab7d7ff427e77ad554a426a3ac7bec3cfaae9e (patch) | |
tree | ac37e1fb2aab5a9a729e3684b0de3cd3639e5c59 /drivers/staging/lustre | |
parent | ee04fd11f11fb67ff0ae482a6710f97f499c19e2 (diff) |
staging/lustre/mdc: fix procfs fops
mdc_kuc_fops is missing open/release handlers. I fixed it before but
somehow forgot to amend to the patch sent out. Sorry...
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r-- | drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c index 8d5c2f4f3c06..6592478e9b6d 100644 --- a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c +++ b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c @@ -78,9 +78,14 @@ static ssize_t mdc_max_rpcs_in_flight_seq_write(struct file *file, } LPROC_SEQ_FOPS(mdc_max_rpcs_in_flight); +static int mdc_kuc_open(struct inode *inode, struct file *file) +{ + return single_open(file, NULL, PDE_DATA(inode)); +} + /* temporary for testing */ -static ssize_t mdc_wr_kuc(struct file *file, const char *buffer, - size_t count, loff_t *off) +static ssize_t mdc_kuc_write(struct file *file, const char *buffer, + size_t count, loff_t *off) { struct obd_device *obd = ((struct seq_file *)file->private_data)->private; struct kuc_hdr *lh; @@ -139,8 +144,11 @@ static ssize_t mdc_wr_kuc(struct file *file, const char *buffer, RETURN(rc); RETURN(count); } + struct file_operations mdc_kuc_fops = { - .write = mdc_wr_kuc, + .open = mdc_kuc_open, + .write = mdc_kuc_write, + .release = single_release, }; LPROC_SEQ_FOPS_WR_ONLY(mdc, ping); |