Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32125
b: refs/heads/master
c: f07f18d
h: refs/heads/master
i:
  32123: 2983771
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jul 5, 2006
1 parent cdfa483 commit c31c9d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42a2d13eee3c895d22e9d1a52b96d15ca49adabc
refs/heads/master: f07f18dd6f29f11887b8d9cf7ecb736bf2f7dc62
5 changes: 5 additions & 0 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,8 @@ static int flock_lock_file(struct file *filp, struct file_lock *request)
int found = 0;

lock_kernel();
if (request->fl_flags & FL_ACCESS)
goto find_conflict;
for_each_lock(inode, before) {
struct file_lock *fl = *before;
if (IS_POSIX(fl))
Expand Down Expand Up @@ -771,6 +773,7 @@ static int flock_lock_file(struct file *filp, struct file_lock *request)
if (found)
cond_resched();

find_conflict:
for_each_lock(inode, before) {
struct file_lock *fl = *before;
if (IS_POSIX(fl))
Expand All @@ -784,6 +787,8 @@ static int flock_lock_file(struct file *filp, struct file_lock *request)
locks_insert_block(fl, request);
goto out;
}
if (request->fl_flags & FL_ACCESS)
goto out;
locks_copy_lock(new_fl, request);
locks_insert_lock(&inode->i_flock, new_fl);
new_fl = NULL;
Expand Down

0 comments on commit c31c9d4

Please sign in to comment.