Whamcloud - gitweb
LU-9679 lustre: avoid cast of file->private_data
[fs/lustre-release.git] / lustre / mdc / lproc_mdc.c
index c6a7e99..cf21905 100644 (file)
@@ -469,11 +469,11 @@ static ssize_t mdc_dom_min_repsize_seq_write(struct file *file,
                                             const char __user *buffer,
                                             size_t count, loff_t *off)
 {
                                             const char __user *buffer,
                                             size_t count, loff_t *off)
 {
-       struct obd_device *dev;
+       struct seq_file *m = file->private_data;
+       struct obd_device *dev = m->private;
        unsigned int val;
        int rc;
 
        unsigned int val;
        int rc;
 
-       dev =  ((struct seq_file *)file->private_data)->private;
        rc = kstrtouint_from_user(buffer, count, 0, &val);
        if (rc)
                return rc;
        rc = kstrtouint_from_user(buffer, count, 0, &val);
        if (rc)
                return rc;