const char __user *buffer, size_t count,
loff_t *off)
{
+ struct seq_file *m = file->private_data;
u64 value;
__u64 watermark;
- __u64 *data = ((struct seq_file *)file->private_data)->private;
+ __u64 *data = m->private;
bool wm_low = (data == &ldlm_reclaim_threshold_mb) ? true : false;
char kernbuf[22] = "";
int rc;
*/
unlock_res(res);
LDLM_DEBUG(lock, "setting FL_LOCAL_ONLY");
- if (lock->l_flags & LDLM_FL_FAIL_LOC) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(cfs_time_seconds(4));
- set_current_state(TASK_RUNNING);
- }
+ if (lock->l_flags & LDLM_FL_FAIL_LOC)
+ schedule_timeout_uninterruptible(
+ cfs_time_seconds(4));
+
if (lock->l_completion_ast)
lock->l_completion_ast(lock,
LDLM_FL_FAILED, NULL);