Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106036
b: refs/heads/master
c: 764c76b
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Jul 25, 2008
1 parent a549c8d commit edded0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b648a6de00770cc325c22f43bdd4e935f6a2ee55
refs/heads/master: 764c76b371722e0cba5c24d91225f0f954b69d44
23 changes: 9 additions & 14 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1747,21 +1747,16 @@ static int do_lock_file_wait(struct file *filp, unsigned int cmd,
if (error)
return error;

if (filp->f_op && filp->f_op->lock != NULL)
error = filp->f_op->lock(filp, cmd, fl);
else {
for (;;) {
error = posix_lock_file(filp, fl, NULL);
if (error != FILE_LOCK_DEFERRED)
break;
error = wait_event_interruptible(fl->fl_wait,
!fl->fl_next);
if (!error)
continue;

locks_delete_block(fl);
for (;;) {
error = vfs_lock_file(filp, cmd, fl, NULL);
if (error != FILE_LOCK_DEFERRED)
break;
}
error = wait_event_interruptible(fl->fl_wait, !fl->fl_next);
if (!error)
continue;

locks_delete_block(fl);
break;
}

return error;
Expand Down

0 comments on commit edded0f

Please sign in to comment.