Skip to content

Commit

Permalink
staging/lustre/mdc: fix procfs fops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bergwolf committed Jun 5, 2013
1 parent f3479ea commit 30caa30
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions drivers/staging/lustre/lustre/mdc/lproc_mdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

1 comment on commit 30caa30

@adilger
Copy link

@adilger adilger commented on 30caa30 Jun 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK.

Please sign in to comment.