Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92ab7d7f authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman
Browse files

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: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ee04fd11
Loading
Loading
Loading
Loading
+11 −3
Original line number Original line Diff line number Diff line
@@ -78,8 +78,13 @@ static ssize_t mdc_max_rpcs_in_flight_seq_write(struct file *file,
}
}
LPROC_SEQ_FOPS(mdc_max_rpcs_in_flight);
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 */
/* temporary for testing */
static ssize_t mdc_wr_kuc(struct file *file, const char *buffer,
static ssize_t mdc_kuc_write(struct file *file, const char *buffer,
			     size_t count, loff_t *off)
			     size_t count, loff_t *off)
{
{
	struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
	struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
@@ -139,8 +144,11 @@ static ssize_t mdc_wr_kuc(struct file *file, const char *buffer,
		RETURN(rc);
		RETURN(rc);
	RETURN(count);
	RETURN(count);
}
}

struct file_operations mdc_kuc_fops = {
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);
LPROC_SEQ_FOPS_WR_ONLY(mdc, ping);