aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 6222e4b580e2..01490300f7cb 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1747,21 +1747,16 @@ static int do_lock_file_wait(struct file *filp, unsigned int cmd,
1747 if (error) 1747 if (error)
1748 return error; 1748 return error;
1749 1749
1750 if (filp->f_op && filp->f_op->lock != NULL) 1750 for (;;) {
1751 error = filp->f_op->lock(filp, cmd, fl); 1751 error = vfs_lock_file(filp, cmd, fl, NULL);
1752 else { 1752 if (error != FILE_LOCK_DEFERRED)
1753 for (;;) {
1754 error = posix_lock_file(filp, fl, NULL);
1755 if (error != FILE_LOCK_DEFERRED)
1756 break;
1757 error = wait_event_interruptible(fl->fl_wait,
1758 !fl->fl_next);
1759 if (!error)
1760 continue;
1761
1762 locks_delete_block(fl);
1763 break; 1753 break;
1764 } 1754 error = wait_event_interruptible(fl->fl_wait, !fl->fl_next);
1755 if (!error)
1756 continue;
1757
1758 locks_delete_block(fl);
1759 break;
1765 } 1760 }
1766 1761
1767 return error; 1762 return error;