Commit 0adfb15a authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

[PATCH] flock_lock_file livelock fix

Looks like I dropped a hunk from my patchset, sorry.

We never set FL_SLEEP in the flock case, so if we should block, we'll
livelock instead.
parent a9ee74e7
...@@ -253,7 +253,7 @@ static int flock_make_lock(struct file *filp, ...@@ -253,7 +253,7 @@ static int flock_make_lock(struct file *filp,
fl->fl_file = filp; fl->fl_file = filp;
fl->fl_pid = current->pid; fl->fl_pid = current->pid;
fl->fl_flags = FL_FLOCK; fl->fl_flags = (cmd & LOCK_NB) ? FL_FLOCK : FL_FLOCK | FL_SLEEP;
fl->fl_type = type; fl->fl_type = type;
fl->fl_end = OFFSET_MAX; fl->fl_end = OFFSET_MAX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment