Whamcloud - gitweb
LU-13783 procfs: fix improper prop_ops fields
[fs/lustre-release.git] / lustre / lmv / lproc_lmv.c
index 6e0e7cc..feded16 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_CLASS
@@ -132,8 +131,8 @@ static ssize_t qos_prio_free_store(struct kobject *kobj,
                return -EINVAL;
 
        lmv->lmv_qos.lq_prio_free = (val << 8) / 100;
-       lmv->lmv_qos.lq_dirty = 1;
-       lmv->lmv_qos.lq_reset = 1;
+       set_bit(LQ_DIRTY, &lmv->lmv_qos.lq_flags);
+       set_bit(LQ_RESET, &lmv->lmv_qos.lq_flags);
 
        return count;
 }
@@ -169,7 +168,7 @@ static ssize_t qos_threshold_rr_store(struct kobject *kobj,
                return -EINVAL;
 
        lmv->lmv_qos.lq_threshold_rr = (val << 8) / 100;
-       lmv->lmv_qos.lq_dirty = 1;
+       set_bit(LQ_DIRTY, &lmv->lmv_qos.lq_flags);
 
        return count;
 }
@@ -249,12 +248,12 @@ static int lmv_target_seq_open(struct inode *inode, struct file *file)
        return 0;
 }
 
-static const struct file_operations lmv_proc_target_fops = {
-        .owner                = THIS_MODULE,
-        .open                 = lmv_target_seq_open,
-        .read                 = seq_read,
-        .llseek               = seq_lseek,
-        .release              = seq_release,
+static const struct proc_ops lmv_proc_target_fops = {
+       PROC_OWNER(THIS_MODULE)
+       .proc_open      = lmv_target_seq_open,
+       .proc_read      = seq_read,
+       .proc_lseek     = seq_lseek,
+       .proc_release   = seq_release,
 };
 #endif /* CONFIG_PROC_FS */