+static int lprocfs_rd_elc(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ struct ldlm_namespace *ns = data;
+ unsigned int supp = ns_connect_cancelset(ns);
+
+ return lprocfs_rd_uint(page, start, off, count, eof, &supp);
+}
+
+static int lprocfs_wr_elc(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct ldlm_namespace *ns = data;
+ unsigned int supp = -1;
+ int rc;
+
+ rc = lprocfs_wr_uint(file, buffer, count, &supp);
+ if (rc < 0)
+ return rc;
+
+ if (supp == 0)
+ ns->ns_connect_flags &= ~OBD_CONNECT_CANCELSET;
+ else if (ns->ns_orig_connect_flags & OBD_CONNECT_CANCELSET)
+ ns->ns_connect_flags |= OBD_CONNECT_CANCELSET;
+ return count;
+}
+